diff options
author | Nicolai Hähnle <[email protected]> | 2017-02-07 08:43:09 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-02-10 11:47:12 +0000 |
commit | de6e6a347dd12c079a098f3f3095394eed326166 (patch) | |
tree | 2e23ea7f5f9eabdb5a2299db0aa22ccf4c605e42 | |
parent | a04cb3f8a5e53e76ffb19b55d91543d41387f372 (diff) |
loader: unconditionally include unistd.h and stdlib.h
Otherwise we would fail with "implicit declaration of function" geteuid
and getenv respectively.
To trigger (re)move the libdrm.pc file and use the following:
$ ./autogen.sh --disable-egl --disable-gbm --disable-dri \
--with-dri-drivers=swrast --with-gallium-drivers=swrast
$ make
Cc: Vinson Lee <[email protected]>
Fixes: 3f462050c ("loader: Add an environment variable to override driver name choice.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99701
v2: [Emil: handle stdlib.h add commit message]
Signed-off-by: Emil Velikov <[email protected]>
-rw-r--r-- | src/loader/loader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c index 4825151ad5e..3b28a0e7db7 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -33,6 +33,8 @@ #include <stdio.h> #include <stdbool.h> #include <string.h> +#include <unistd.h> +#include <stdlib.h> #ifdef MAJOR_IN_MKDEV #include <sys/mkdev.h> #endif @@ -42,8 +44,6 @@ #include "loader.h" #ifdef HAVE_LIBDRM -#include <stdlib.h> -#include <unistd.h> #include <xf86drm.h> #ifdef USE_DRICONF #include "xmlconfig.h" |