diff options
author | ed <ed@FreeBSD.org> | 2009-12-02 15:56:18 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-12-02 15:56:18 +0000 |
commit | eda09843b720a9694f78ad33ee87f16310744c44 (patch) | |
tree | b181bc19dfbfbc9b4c78ba4a6c2976b25fd1fb6d /lib | |
parent | d09026c2895f57af07b1c274da24778a9716acab (diff) | |
download | FreeBSD-src-eda09843b720a9694f78ad33ee87f16310744c44.zip FreeBSD-src-eda09843b720a9694f78ad33ee87f16310744c44.tar.gz |
Make <libutil.h> work when included by itself.
There are several reasons why it didn't work:
- It was missing <sys/cdefs.h> for __BEGIN_DECLS.
- It uses various primitive types that were not declared.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/libutil.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index 3187fb3..fca133f 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -39,6 +39,34 @@ #ifndef _LIBUTIL_H_ #define _LIBUTIL_H_ +#include <sys/cdefs.h> +#include <sys/_types.h> + +#ifndef _GID_T_DECLARED +typedef __gid_t gid_t; +#define _GID_T_DECLARED +#endif + +#ifndef _INT64_T_DECLARED +typedef __int64_t int64_t; +#define _INT64_T_DECLARED +#endif + +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +#ifndef _UID_T_DECLARED +typedef __uid_t uid_t; +#define _UID_T_DECLARED +#endif + #define PROPERTY_MAX_NAME 64 #define PROPERTY_MAX_VALUE 512 |