diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-12-02 15:56:18 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-12-02 15:56:18 +0000 |
commit | 39568873e3f7967d6882ac64195cf47c2836e62a (patch) | |
tree | 68fc39cb8b4ea20acc0365661a059814d93767dc /libutil/libutil.h | |
parent | ac2ff2f73f6c37b44d2ab12c0a0cdbcf37be8eb3 (diff) | |
download | pw-darwin-39568873e3f7967d6882ac64195cf47c2836e62a.tar.gz pw-darwin-39568873e3f7967d6882ac64195cf47c2836e62a.tar.zst pw-darwin-39568873e3f7967d6882ac64195cf47c2836e62a.zip |
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 'libutil/libutil.h')
-rw-r--r-- | libutil/libutil.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libutil/libutil.h b/libutil/libutil.h index 3187fb3..fca133f 100644 --- a/libutil/libutil.h +++ b/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 |