Skip to content

Commit add2bfd

Browse files
yelnineiCarterLi
authored andcommitted
Fix localip_linux on GNU
1 parent e508100 commit add2bfd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/detection/localip/localip_linux.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
394394
FF_DEBUG("Added IPv6 entry for interface %s", ifa->ifa_name);
395395
}
396396
break;
397-
#if __FreeBSD__ || __OpenBSD__ || __APPLE__ || __NetBSD__ || __HAIKU__
397+
#if __FreeBSD__ || __OpenBSD__ || __APPLE__ || __NetBSD__ || __HAIKU__ || __GNU__
398398
case AF_LINK:
399399
adapter->mac = ifa;
400400
FF_DEBUG("Updated MAC entry for interface %s", ifa->ifa_name);
@@ -546,7 +546,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
546546
}
547547
}
548548
mac:
549-
#ifndef __sun
549+
#if !defined( __sun) && !defined(__GNU__)
550550
if (options->showType & FF_LOCALIP_TYPE_MAC_BIT)
551551
{
552552
if (adapter->mac->ifa_addr)
@@ -565,7 +565,6 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
565565
FF_DEBUG("No MAC address available for interface %s", adapter->mac->ifa_name);
566566
}
567567
}
568-
#elif defined(__GNU__)
569568
#else
570569
(void) adapter;
571570
#endif

0 commit comments

Comments
 (0)