Patch "selftests/vm: remove __USE_GNU in hugetlb-madvise.c" has been added to the 6.1-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    selftests/vm: remove __USE_GNU in hugetlb-madvise.c

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-vm-remove-__use_gnu-in-hugetlb-madvise.c.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 30bd9afe6d55a72cec45bf4a4aa710c601297d6d
Author: Peter Xu <peterx@xxxxxxxxxx>
Date:   Mon Jan 16 11:33:07 2023 -0500

    selftests/vm: remove __USE_GNU in hugetlb-madvise.c
    
    [ Upstream commit 0ca2c535f5a07f01118a6a70bfab78576e02fcae ]
    
    __USE_GNU should be an internal macro only used inside glibc.  Either
    memfd_create() or fallocate() requires _GNU_SOURCE per man page, where
    __USE_GNU will further be defined by glibc headers include/features.h:
    
      #ifdef _GNU_SOURCE
      # define __USE_GNU    1
      #endif
    
    This fixes:
    
       >> hugetlb-madvise.c:20: warning: "__USE_GNU" redefined
          20 | #define __USE_GNU
             |
       In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                        from /usr/include/stdlib.h:26,
                        from hugetlb-madvise.c:16:
       /usr/include/features.h:407: note: this is the location of the previous definition
         407 | # define __USE_GNU      1
             |
    
    Link: https://lkml.kernel.org/r/Y8V9z+z6Tk7NetI3@x1n
    Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/vm/hugetlb-madvise.c b/tools/testing/selftests/vm/hugetlb-madvise.c
index 3c9943131881..b3f01f1f7a60 100644
--- a/tools/testing/selftests/vm/hugetlb-madvise.c
+++ b/tools/testing/selftests/vm/hugetlb-madvise.c
@@ -16,7 +16,6 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/mman.h>
-#define __USE_GNU
 #include <fcntl.h>
 
 #define USAGE	"USAGE: %s <hugepagefile_name>\n"



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux