diff options
author | Neil Brown <neilb@suse.de> | 2006-05-29 04:09:21 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-05-29 04:09:21 +0000 |
commit | c97be4db86a710faef7b21829c2aa59f228212b2 (patch) | |
tree | 40c4a3e12bd79e8299ef557bcf7589f2b6b757ce /pwgr.c | |
parent | 0c239ef733aa16d9716942de204b73d5f80fe557 (diff) | |
download | mdadm-c97be4db86a710faef7b21829c2aa59f228212b2.tar.gz mdadm-c97be4db86a710faef7b21829c2aa59f228212b2.tar.xz mdadm-c97be4db86a710faef7b21829c2aa59f228212b2.zip |
Improve compiling for static binaries.
Have "#ifdef STATIC" in config.c, and the 'rmconf' target
was a mess.
Instead, create 'pwgr.c' with stub routines for those unavailable
when statically compiled, and include that in STATICOBJ
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'pwgr.c')
-rw-r--r-- | pwgr.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ + +/* + * We cannot link a static binary with passwd/group support, so + * just do without + */ +#include <stdlib.h> +#include <pwd.h> +#include <grp.h> + +struct passwd *getpwnam(const char *name) +{ + return NULL; +} +struct group *getgrnam(const char *name) +{ + return NULL; +} |