diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-09-23 12:00:08 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-09-23 12:17:34 -0700 |
commit | 6e6917dd5918f5ae520f71e53128eee3267656b8 (patch) | |
tree | 7314153fc24c7ccccd50e045be4929517a670f7d | |
parent | f431e5b6c266a751dfabb19be286baf08393516a (diff) |
Clear -Wunused-macros warnings when arc4random_buf() is available
Reported by clang:
Key.c:46:9: warning: macro is not used [-Wunused-macros]
#define Time_t time_t
^
Key.c:52:9: warning: macro is not used [-Wunused-macros]
#define random lrand48
^
Key.c:51:9: warning: macro is not used [-Wunused-macros]
#define srandom srand48
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | Key.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -31,6 +31,7 @@ in this Software without prior written authorization from The Open Group. #include <X11/X.h> #include <X11/Xmd.h> #include <X11/Xdmcp.h> +#include <stdlib.h> #ifndef HAVE_ARC4RANDOM_BUF static void @@ -41,12 +42,9 @@ getbits (long data, unsigned char *dst) dst[2] = (data >> 16) & 0xff; dst[3] = (data >> 24) & 0xff; } -#endif #define Time_t time_t -#include <stdlib.h> - #if defined(HAVE_LRAND48) && defined(HAVE_SRAND48) #define srandom srand48 #define random lrand48 @@ -58,8 +56,6 @@ getbits (long data, unsigned char *dst) #define getpid(x) _getpid(x) #endif -#ifndef HAVE_ARC4RANDOM_BUF - /* Solaris 11.3.0 - 11.4.15 only define getentropy() in <sys/random.h> */ #if HAVE_GETENTROPY && HAVE_SYS_RANDOM_H # include <sys/random.h> |