24 lines
633 B
Diff
24 lines
633 B
Diff
|
|
From c90640fae5aeb54c9569558447d7f51355d0368a Mon Sep 17 00:00:00 2001
|
||
|
|
From: Pedro Gonnet <gonnet@google.com>
|
||
|
|
Date: Thu, 9 Jan 2025 13:31:02 -0800
|
||
|
|
Subject: [PATCH] Wrap `#define _GNU_SOURCE` in an `#ifndef` in case it has
|
||
|
|
already been defined.
|
||
|
|
|
||
|
|
PiperOrigin-RevId: 713777960
|
||
|
|
|
||
|
|
diff --git a/src/pthreads.c b/src/pthreads.c
|
||
|
|
index 6f7829f..237edd2 100644
|
||
|
|
--- a/src/pthreads.c
|
||
|
|
+++ b/src/pthreads.c
|
||
|
|
@@ -8,7 +8,9 @@
|
||
|
|
// LICENSE file in the root directory of this source tree.
|
||
|
|
|
||
|
|
// Needed for syscall.
|
||
|
|
-#define _GNU_SOURCE
|
||
|
|
+#ifndef _GNU_SOURCE
|
||
|
|
+#define _GNU_SOURCE 1
|
||
|
|
+#endif // _GNU_SOURCE
|
||
|
|
|
||
|
|
/* Standard C headers */
|
||
|
|
#include <assert.h>
|