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

[PATCH 3/4] Use __linux__ conditional, not LINUX.

From
PRPavel Roskin <proski@gnu.org>
Date
Jun 13, 2006, 04:32 UTC
Message-ID
<20060613043231.16681.13655.stgit@dv.roinet.com>
In-Reply-To
<20060613043224.16681.98358.stgit@dv.roinet.com>
From: Pavel Roskin <proski@gnu.org>
__linux__ is defined automatically, LINUX is not.
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 cbtcommon/tcpsocket.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cbtcommon/tcpsocket.c b/cbtcommon/tcpsocket.c
index 27cc13a..a174007 100644
--- a/cbtcommon/tcpsocket.c
+++ b/cbtcommon/tcpsocket.c
@@ -185,14 +185,14 @@ #endif
 int
 convert_address(long *dest, const char *addr_str)
 {
-#ifdef LINUX
+#ifdef __linux__
   struct in_addr ip;
 #endif
   int retval = 0;
   char errstr[256];
   
   /* first try converting "numbers and dots" notation */
-#ifdef LINUX
+#ifdef __linux__
   if ( inet_aton(addr_str, &ip) )
   {
     memcpy(dest, &ip.s_addr, sizeof(ip.s_addr));
Previous: Pavel RoskinNext: Pavel Roskin
Message 3 of 4 in “Remove dependencies with absolute path”
  1. 1/4 Remove dependencies with absolute pathPavel Roskin, Jun 13, 2006
  2. 2/4 Trivial compile fix for cache.cPavel Roskin, Jun 13, 2006
  3. 3/4 Use __linux__ conditional, not LINUX.Pavel Roskin, Jun 13, 2006
  4. 4/4 Use INADDR_NONE instead of -1 to check inet_addr() resultPavel Roskin, Jun 13, 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.