aboutsummaryrefslogtreecommitdiff
path: root/tools/build/cross-build/include/common
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2021-12-06 23:25:53 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2021-12-07 00:24:20 +0000
commite0cb1fe7dd34e9786320befa623b181d29d6bdf9 (patch)
tree80b6a852b1ddb790d19b7626b3b8d4f0b74ec232 /tools/build/cross-build/include/common
parent8ceba27a5d51e2fcc0ea547d5051bd859d15233c (diff)
downloadsrc-e0cb1fe7dd34e9786320befa623b181d29d6bdf9.tar.gz
src-e0cb1fe7dd34e9786320befa623b181d29d6bdf9.zip
cross-build: Provide _PASSWORD_EFMT1 for libcrypt on Linux
Linux's pwd.h does not define _PASSWORD_EFMT1 (macOS's does), so we need to define it in order to be able to bootstrap libcrypt (crypt-des.c uses it) on non-FreeBSD, which will be done in a subsequent commit. MFC after: 1 week
Diffstat (limited to 'tools/build/cross-build/include/common')
-rw-r--r--tools/build/cross-build/include/common/pwd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/build/cross-build/include/common/pwd.h b/tools/build/cross-build/include/common/pwd.h
index 14abc7fcadf0..109119e9bfe3 100644
--- a/tools/build/cross-build/include/common/pwd.h
+++ b/tools/build/cross-build/include/common/pwd.h
@@ -41,6 +41,10 @@
#define user_from_uid __nbcompat_user_from_uid
+#ifndef _PASSWORD_EFMT1
+#define _PASSWORD_EFMT1 '_' /* extended encryption format */
+#endif
+
int pwcache_userdb(int (*a_setpassent)(int), void (*a_endpwent)(void),
struct passwd *(*a_getpwnam)(const char *),
struct passwd *(*a_getpwuid)(uid_t));