{"thread":{"id":"32339","subject":"[PATCH 2/4] Detect when the passwd struct is missing pw_gecos","startedAt":"2012-12-14T19:56:59Z","lastAt":"2012-12-14T19:56:59Z","messageCount":1,"participants":["David Michael"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"204876","messageId":"CAEvUa7=1Es8LzyHt3XhWJGm+nFum=ggunRCi8hJB9A9nuL5KUg@mail.gmail.com","threadId":"32339","inReplyTo":null,"subject":"[PATCH 2/4] Detect when the passwd struct is missing pw_gecos","fromName":"David Michael","fromEmail":"fedora.dm0@gmail.com","sentAt":"2012-12-14T19:56:59Z","receivedAt":"2012-12-14T19:56:59Z","isPatch":true,"sender":{"key":"fedora.dm0@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1379865?v=4"},"body":"NO_GECOS_IN_PWENT was documented with other Makefile variables but was only\nenforced by manually defining it to the C preprocessor.  This adds support\nfor detecting the condition with configure and defining the make variable.\n\nSigned-off-by: David Michael <fedora.dm0@gmail.com>\n---\n Makefile     | 3 +++\n configure.ac | 8 ++++++++\n 2 files changed, 11 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex 8c3a0dd..735a834 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1657,6 +1657,9 @@ endif\n ifdef NO_D_INO_IN_DIRENT\n     BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT\n endif\n+ifdef NO_GECOS_IN_PWENT\n+    BASIC_CFLAGS += -DNO_GECOS_IN_PWENT\n+endif\n ifdef NO_ST_BLOCKS_IN_STRUCT_STAT\n     BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT\n endif\ndiff --git a/configure.ac b/configure.ac\nindex 317bfc6..3347c17 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -759,6 +759,14 @@ AC_CHECK_MEMBER(struct dirent.d_type,\n [#include <dirent.h>])\n GIT_CONF_SUBST([NO_D_TYPE_IN_DIRENT])\n #\n+# Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd\n+# in the C library.\n+AC_CHECK_MEMBER(struct passwd.pw_gecos,\n+[NO_GECOS_IN_PWENT=],\n+[NO_GECOS_IN_PWENT=YesPlease],\n+[#include <pwd.h>])\n+GIT_CONF_SUBST([NO_GECOS_IN_PWENT])\n+#\n # Define NO_SOCKADDR_STORAGE if your platform does not have struct\n # sockaddr_storage.\n AC_CHECK_TYPE(struct sockaddr_storage,\n--\n1.7.11.7\n"}]}