git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Define -D__BSD_VISIBLE for FreeBSD

From
RRRocco Rutte <pdmef@gmx.net>
Date
Dec 21, 2006, 09:00 UTC
Message-ID
<11666916581935-git-send-email-pdmef@gmx.net>

FreeBSD (6-STABLE) "hides" many declarations (like fchmod(), IPPROTO_IPV6, etc.) within '#ifdef __BSD_VISIBLE' blocks. Without this flag, compilation will produce lots of warnings and will even fail to compile daemon.c since IPPROTO_IPV6 isn't available without it.

>From looking at some include files of OpenBSD and NetBSD (via cvsweb)
they don't seem to need this flag.
Signed-off-by: Rocco Rutte <pdmef@gmx.net>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 7651104..46c49e0 100644
--- a/Makefile
+++ b/Makefile
@@ -366,7 +366,7 @@ ifeq ($(uname_O),Cygwin)
 endif
 ifeq ($(uname_S),FreeBSD)
 	NEEDS_LIBICONV = YesPlease
-	BASIC_CFLAGS += -I/usr/local/include
+	BASIC_CFLAGS += -I/usr/local/include -D__BSD_VISIBLE
 	BASIC_LDFLAGS += -L/usr/local/lib
 endif
 ifeq ($(uname_S),OpenBSD)
-- 
1.4.4.2.g9474f
Next: Junio C Hamano
Message 1 of 3 in “Define -D__BSD_VISIBLE for FreeBSD”
  1. Define -D__BSD_VISIBLE for FreeBSDRocco Rutte, Dec 21, 2006
  2. Junio C HamanoDec 21, 2006
  3. Rocco RutteDec 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.