{"thread":{"id":"23297","subject":"[PATCH] Fix _XOPEN_SOURCE problem on DragonFly","startedAt":"2010-04-02T07:52:09Z","lastAt":"2010-04-02T07:52:09Z","messageCount":1,"participants":["YONETANI Tomokazu"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"138404","messageId":"20100402075209.GA53099@les.ath.cx","threadId":"23297","inReplyTo":null,"subject":"[PATCH] Fix _XOPEN_SOURCE problem on DragonFly","fromName":"YONETANI Tomokazu","fromEmail":"y0netan1@dragonflybsd.org","sentAt":"2010-04-02T07:52:09Z","receivedAt":"2010-04-02T07:52:09Z","isPatch":true,"sender":{"key":"y0n3t4n1@gmail.com","avatar":null},"body":"As on FreeBSD, defining _XOPEN_SOURCE to 600 on DragonFly BSD 2.4-RELEASE\nor later hides symbols from programs, which leads to implicit declaration\nof functions, making the return value to be assumed an int.  On architectures\nwhere sizeof(int) < sizeof(void *), this can cause unexpected behaviors or\ncrashes.\nThis change won't affect other OSes unless they define __DragonFly__ macro,\nor older versions of DragonFly BSD as the current git code doesn't rely on\nthe features only available with _XOPEN_SOURCE set to 600 on DragonFly.\n\nSigned-off-by: YONETANI Tomokazu <y0netan1@dragonflybsd.org>\n---\n git-compat-util.h |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex a3c4537..e292926 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -55,7 +55,8 @@\n # else\n # define _XOPEN_SOURCE 500\n # endif\n-#elif !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi)\n+#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \\\n+      !defined(_M_UNIX) && !defined(sgi) && !defined(__DragonFly__)\n #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n-- \n1.6.6.2\n"}]}