Re: [PATCH BlueZ] input: Fix build error due to O_CLOEXEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 28, 2012 at 11:28 AM, Anderson Lizardo
<anderson.lizardo@xxxxxxxxxxxxx> wrote:
> On some (not so old) systems like Ubuntu 10.04 LTS, O_CLOEXEC is only
> defined if _GNU_SOURCE is defined.
>
> This fixes this build error:
>
> profiles/input/hog_device.c: In function 'hog_device_register':
> profiles/input/hog_device.c:712: error: 'O_CLOEXEC' undeclared (first
> use in this function)
> profiles/input/hog_device.c:712: error: (Each undeclared identifier is
> reported only once
> profiles/input/hog_device.c:712: error: for each function it appears
> in.)
> ---
>  profiles/input/hog_device.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/profiles/input/hog_device.c b/profiles/input/hog_device.c
> index 000f173..b502274 100644
> --- a/profiles/input/hog_device.c
> +++ b/profiles/input/hog_device.c
> @@ -27,6 +27,7 @@
>  #include <config.h>
>  #endif
>
> +#define _GNU_SOURCE

this should be already in our config.h. It seems like we are missing
the following in our configure.ac:

AC_USE_SYSTEM_EXTENSIONS.

Btw, we should remove the other definitions of _GNU_SOURCE

>  #include <stdlib.h>
>  #include <errno.h>
>  #include <unistd.h>


Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux