Message ID | 1451461915-112672-1-git-send-email-raj.khem@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Dec 30, 2015 at 07:51:55AM +0000, Khem Raj wrote: > Fixes errors e.g. > > error: implicit declaration of function 'select' > > and missing definitions of FD_* defines > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > --- > tests/kms/kms-steal-crtc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c > index 2f7f327..24d70ab 100644 > --- a/tests/kms/kms-steal-crtc.c > +++ b/tests/kms/kms-steal-crtc.c > @@ -31,6 +31,7 @@ > #include <stdio.h> > #include <string.h> > #include <unistd.h> > +#include <sys/select.h> This must be pulled in some other way on my system, but this looks correct: Reviewed-by: Thierry Reding <treding@nvidia.com>
On 4 January 2016 at 08:38, Thierry Reding <thierry.reding@gmail.com> wrote: > On Wed, Dec 30, 2015 at 07:51:55AM +0000, Khem Raj wrote: >> Fixes errors e.g. >> >> error: implicit declaration of function 'select' >> >> and missing definitions of FD_* defines >> >> Signed-off-by: Khem Raj <raj.khem@gmail.com> >> --- >> tests/kms/kms-steal-crtc.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c >> index 2f7f327..24d70ab 100644 >> --- a/tests/kms/kms-steal-crtc.c >> +++ b/tests/kms/kms-steal-crtc.c >> @@ -31,6 +31,7 @@ >> #include <stdio.h> >> #include <string.h> >> #include <unistd.h> >> +#include <sys/select.h> > > This must be pulled in some other way on my system, but this looks > correct: > The above header is required/used in compliance with POSIX 2001/2008. Earlier standards use the below three. #include <sys/time.h> #include <sys/types.h> #include <unistd.h> I'm not sure how much we should care about platforms non-compliant to POSIX 2001... although adding the header check seems pretty trivial. Add the new one in the list at configure.ac:AC_CHECK_HEADERS and wrap the include in a ifdef guard. From a quick grep there are a few other users of select() tests/kms/kms-steal-crtc.c tests/kms/kms-universal-planes.c tests/modetest/modetest.c tests/vbltest/vbltest.c Raj, can you update the patch to handle the lot (one patch should be ok imho) ? Thanks Emil
diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c index 2f7f327..24d70ab 100644 --- a/tests/kms/kms-steal-crtc.c +++ b/tests/kms/kms-steal-crtc.c @@ -31,6 +31,7 @@ #include <stdio.h> #include <string.h> #include <unistd.h> +#include <sys/select.h> #include <drm_fourcc.h>
Fixes errors e.g. error: implicit declaration of function 'select' and missing definitions of FD_* defines Signed-off-by: Khem Raj <raj.khem@gmail.com> --- tests/kms/kms-steal-crtc.c | 1 + 1 file changed, 1 insertion(+)