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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -31,7 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | #include <linux/hdlc/ioctl.h> |
| 32 | 32 | |
| 33 | 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 | 35 | __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 |
| 36 | 36 | /** |
| 37 | 37 | * enum net_device_flags - &struct net_device flags |
| @@ -99,7 +99,7 @@ enum net_device_flags { · 61 unmodified lines | ||
| 99 | 99 | IFF_ECHO = 1<<18, /* volatile */ |
| 100 | 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 | 104 | /* for compatibility with glibc net/if.h */ |
| 105 | 105 | #if __UAPI_DEF_IF_NET_DEVICE_FLAGS |