unrandom: #define _GNU_SOURCE, for syscall(). This is needed when unrandom.c is compiled on its own. Change-Id: Ia46e06d267c097e5fa0296092a7270a4cd0b2044 Reviewed-on: https://boringssl-review.googlesource.com/16085 Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/fipsmodule/rand/urandom.c b/crypto/fipsmodule/rand/urandom.c index 202f2a4..9a821f7 100644 --- a/crypto/fipsmodule/rand/urandom.c +++ b/crypto/fipsmodule/rand/urandom.c
@@ -12,6 +12,10 @@ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#if !defined(_GNU_SOURCE) +#define _GNU_SOURCE /* needed for syscall() on Linux. */ +#endif + #include <openssl/rand.h> #if !defined(OPENSSL_WINDOWS) && !defined(OPENSSL_FUCHSIA) && \