From b1416db3227b4b7192ee0d2d3ff6e00e92e9d3e2 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 1 May 2001 15:32:44 +0000 Subject: [PATCH] ChangeLog, compare.c, gen_uuid.c, parse.c: parse.c, compare.c: Include string.h to fix gcc -Wall complaints. gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors because some required structures wouldn't be otherwise defined. Fix a minor gcc -Wall nit in the declaration of get_random_fd(). --- lib/uuid/ChangeLog | 10 ++++++++++ lib/uuid/compare.c | 1 + lib/uuid/gen_uuid.c | 8 +++++++- lib/uuid/parse.c | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index 94fcb9a..3facde1 100644 --- a/lib/uuid/ChangeLog +++ b/lib/uuid/ChangeLog @@ -1,3 +1,13 @@ +2001-05-01 Theodore Tso + + * parse.c, compare.c: Include string.h to fix gcc -Wall + complaints. + + * gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors + because some required structures wouldn't be otherwise + defined. Fix a minor gcc -Wall nit in the declaration of + get_random_fd(). + 2001-01-12 Theodore Ts'o * uuid_time.c (main), tst_uuid.c (main): Fix gcc -Wall complaints. diff --git a/lib/uuid/compare.c b/lib/uuid/compare.c index d2d9fe7..cc335f5 100644 --- a/lib/uuid/compare.c +++ b/lib/uuid/compare.c @@ -12,6 +12,7 @@ */ #include "uuidP.h" +#include #define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1); diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c index fd55114..1f72439 100644 --- a/lib/uuid/gen_uuid.c +++ b/lib/uuid/gen_uuid.c @@ -9,6 +9,12 @@ * %End-Header% */ +/* + * Force inclusion of SVID stuff since we need it if we're compiling in + * gcc-wall wall mode + */ +#define _SVID_SOURCE + #ifdef HAVE_UNISTD_H #include #endif @@ -41,7 +47,7 @@ #define rand() random() #endif -static int get_random_fd() +static int get_random_fd(void) { struct timeval tv; static int fd = -2; diff --git a/lib/uuid/parse.c b/lib/uuid/parse.c index fdf0911..6c6fe31 100644 --- a/lib/uuid/parse.c +++ b/lib/uuid/parse.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "uuidP.h" -- 1.8.3.1