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 /config.c | |
parent | 0c239ef733aa16d9716942de204b73d5f80fe557 (diff) | |
download | mdadm-c97be4db86a710faef7b21829c2aa59f228212b2.tar.gz |
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 'config.c')
-rw-r--r-- | config.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -320,14 +320,12 @@ static void createline(char *line) } createinfo.uid = strtoul(w+6, &ep, 10); if (*ep != 0) { -#ifndef STATIC struct passwd *pw; /* must be a name */ pw = getpwnam(w+6); if (pw) createinfo.uid = pw->pw_uid; else -#endif /* STATIC */ fprintf(stderr, Name ": CREATE user %s not found\n", w+6); } } else if (strncasecmp(w, "group=", 6) == 0) { @@ -337,14 +335,12 @@ static void createline(char *line) } createinfo.gid = strtoul(w+6, &ep, 10); if (*ep != 0) { -#ifndef STATIC struct group *gr; /* must be a name */ gr = getgrnam(w+6); if (gr) createinfo.gid = gr->gr_gid; else -#endif /* STATIC */ fprintf(stderr, Name ": CREATE group %s not found\n", w+6); } } else if (strncasecmp(w, "mode=", 5) == 0) { |