From 980097f8eca9e08feb2073d06179f53ba46b805e Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 12 Jan 2012 22:55:13 +0100
Subject: [PATCH] random_r: Use common idioms.

* lib/random_r.c: Include <stdlib.h> first.
---
 ChangeLog      | 3 +++
 lib/random_r.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d85e99aac7..f1e4fdcf97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-01-12  Bruno Haible  <bruno@clisp.org>
 
+	random_r: Use common idioms.
+	* lib/random_r.c: Include <stdlib.h> first.
+
 	random_r: Override incompatible API on AIX, OSF/1.
 	* lib/stdlib.in.h (random_r, srandom_r, initstate_r, setstate_r):
 	Override the system function if REPLACE_RANDOM_R is 1.
diff --git a/lib/random_r.c b/lib/random_r.c
index 0494a9eb72..5e0b86ca4e 100644
--- a/lib/random_r.c
+++ b/lib/random_r.c
@@ -57,10 +57,12 @@
    below.  */
 #define _GL_ARG_NONNULL(params)
 
+/* Specification.  */
+#include <stdlib.h>
+
 #include <errno.h>
 #include <limits.h>
 #include <stddef.h>
-#include <stdlib.h>
 #include <stdint.h>
 
 
-- 
2.39.5