diff options
| author | Jonas Gorski <jonas.gorski@gmail.com> | 2016-12-03 11:31:45 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-12-06 10:43:32 -0500 |
| commit | efc45154828ae4e49c6b46f59882bfef32697d44 (patch) | |
| tree | 4b468a33920c67692b4278658d009fefc2c5ccda /include/uapi | |
| parent | 6b3374cb1c0bd4699ace03d7e0dc14b532e4f52e (diff) | |
uapi glibc compat: fix outer guard of net device flags enum
Fix a wrong condition preventing the higher net device flags
IFF_LOWER_UP etc to be defined if net/if.h is included before
linux/if.h.
The comment makes it clear the intention was to allow partial
definition with either parts.
This fixes compilation of userspace programs trying to use
IFF_LOWER_UP, IFF_DORMANT or IFF_ECHO.
Fixes: 4a91cb61bb99 ("uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/if.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h index e601c8c3bdc7..1158a043342a 100644 --- a/include/uapi/linux/if.h +++ b/include/uapi/linux/if.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/hdlc/ioctl.h> | 31 | #include <linux/hdlc/ioctl.h> |
| 32 | 32 | ||
| 33 | /* For glibc compatibility. An empty enum does not compile. */ | 33 | /* For glibc compatibility. An empty enum does not compile. */ |
| 34 | #if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \ | 34 | #if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \ |
| 35 | __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 | 35 | __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 |
| 36 | /** | 36 | /** |
| 37 | * enum net_device_flags - &struct net_device flags | 37 | * enum net_device_flags - &struct net_device flags |
| @@ -99,7 +99,7 @@ enum net_device_flags { | |||
| 99 | IFF_ECHO = 1<<18, /* volatile */ | 99 | IFF_ECHO = 1<<18, /* volatile */ |
| 100 | #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ | 100 | #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ |
| 101 | }; | 101 | }; |
| 102 | #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ | 102 | #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ |
| 103 | 103 | ||
| 104 | /* for compatibility with glibc net/if.h */ | 104 | /* for compatibility with glibc net/if.h */ |
| 105 | #if __UAPI_DEF_IF_NET_DEVICE_FLAGS | 105 | #if __UAPI_DEF_IF_NET_DEVICE_FLAGS |
