Re: [PATCH] avoid "redefined" _GNU_SOURCE by defining as 1

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

 



On 05/03/2017 03:50 PM, David Butterfield wrote:
> Avoid "redefined" _GNU_SOURCE compiler warning by defining it in rbd.c the
> same way it is defined on the conventional "gcc -D_GNU_SOURCE" command line.
> 
> Signed-off-by: David Butterfield <dab21774@xxxxxxxxx>
> ---
>  rbd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rbd.c b/rbd.c
> index ed50aa5..8f78e54 100644
> --- a/rbd.c
> +++ b/rbd.c
> @@ -14,7 +14,7 @@
>   * under the License.
>   */
>  
> -#define _GNU_SOURCE
> +#define _GNU_SOURCE 1
>  #include <inttypes.h>
>  #include <stddef.h>
>  #include <stdint.h>
> 

_GNU_SOURCE is defined on all the files, so do we need a common fix?

Can we just remove it and add something in CMakeCache.txt like some sort of:

add_definitions(-D_GNU_SOURCE)

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



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux