selftests: proc: fix warning: _GNU_SOURCE redefined
authorTommi Rantala <tommi.t.rantala@nokia.com>
Thu, 8 Oct 2020 12:26:30 +0000 (15:26 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 5 Nov 2020 17:08:14 +0000 (10:08 -0700)
Makefile already contains -D_GNU_SOURCE, so we can remove it from the
*.c files.

Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/proc/proc-loadavg-001.c
tools/testing/selftests/proc/proc-self-syscall.c
tools/testing/selftests/proc/proc-uptime-002.c

index 471e2aa280776fce48921d8ecda7e92d5f5e876e..fb4fe9188806e41ee4e401e9d46d36c5cc996af7 100644 (file)
@@ -14,7 +14,6 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 /* Test that /proc/loadavg correctly reports last pid in pid namespace. */
-#define _GNU_SOURCE
 #include <errno.h>
 #include <sched.h>
 #include <sys/types.h>
index 9f6d000c02455135d713709f54268ea10bf64900..8511dcfe67c755719ecf9f58da6dfe7910b904cd 100644 (file)
@@ -13,7 +13,6 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#define _GNU_SOURCE
 #include <unistd.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
index 30e2b78490898351a97e507018a0298e8a40e664..e7ceabed7f51f5c4588fa13653602b7340a173e5 100644 (file)
@@ -15,7 +15,6 @@
  */
 // Test that values in /proc/uptime increment monotonically
 // while shifting across CPUs.
-#define _GNU_SOURCE
 #undef NDEBUG
 #include <assert.h>
 #include <unistd.h>