From 65512e8d22394115ff19832fb930ceec2f866966 Mon Sep 17 00:00:00 2001 From: ahgamut Date: Sun, 6 Nov 2022 20:44:37 +0530 Subject: [PATCH] remove libc/sock/if.h libc/sock/if.h is removed because: - it contained only IFNAMSIZ, which was also defined in libc/sock/struct/ifreq.h - it was not included in any file EXCEPT libc/isystem/net/if.h, which also included the libc/sock/struct/ifreq.h hence we remove this file, and move the IFNAMSIZ definition to libc/sock/struct/ifreq.h which is included in isystem. --- libc/isystem/net/if.h | 1 - libc/sock/if.h | 6 ------ libc/sock/struct/ifreq.h | 2 -- 3 files changed, 9 deletions(-) delete mode 100644 libc/sock/if.h diff --git a/libc/isystem/net/if.h b/libc/isystem/net/if.h index 2ed3eca67..dd43a30dd 100644 --- a/libc/isystem/net/if.h +++ b/libc/isystem/net/if.h @@ -1,6 +1,5 @@ #ifndef COSMOPOLITAN_LIBC_ISYSTEM_NET_IF_H_ #define COSMOPOLITAN_LIBC_ISYSTEM_NET_IF_H_ -#include "libc/sock/if.h" #include "libc/sock/struct/ifconf.h" #include "libc/sock/struct/ifreq.h" #include "libc/sysv/consts/iff.h" diff --git a/libc/sock/if.h b/libc/sock/if.h deleted file mode 100644 index f0d21822a..000000000 --- a/libc/sock/if.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef COSMOPOLITAN_LIBC_SOCK_IF_H_ -#define COSMOPOLITAN_LIBC_SOCK_IF_H_ - -#define IFNAMSIZ 16 - -#endif /* COSMOPOLITAN_LIBC_SOCK_IF_H_ */ diff --git a/libc/sock/struct/ifreq.h b/libc/sock/struct/ifreq.h index 9424276e8..3a3bd7209 100644 --- a/libc/sock/struct/ifreq.h +++ b/libc/sock/struct/ifreq.h @@ -5,9 +5,7 @@ COSMOPOLITAN_C_START_ #define IF_NAMESIZE 16 -#ifndef IFNAMSIZ #define IFNAMSIZ IF_NAMESIZE -#endif struct ifreq { union {