Skip to content
  • Jiri Slaby's avatar
    5a8de47b
    netfilter: bridge: define INT_MIN & INT_MAX in userspace · 5a8de47b
    Jiri Slaby authored
    
    
    With 4.19, programs like ebtables fail to build when they include
    "linux/netfilter_bridge.h". It is caused by commit 94276fa8 which
    added a use of INT_MIN and INT_MAX to the header:
    : In file included from /usr/include/linux/netfilter_bridge/ebtables.h:18,
    :                  from include/ebtables_u.h:28,
    :                  from communication.c:23:
    : /usr/include/linux/netfilter_bridge.h:30:20: error: 'INT_MIN' undeclared here (not in a function)
    :   NF_BR_PRI_FIRST = INT_MIN,
    :                     ^~~~~~~
    
    Define these constants by including "limits.h" when !__KERNEL__ (the
    same way as for other netfilter_* headers).
    
    Fixes: 94276fa8 ("netfilter: bridge: Expose nf_tables bridge hook priorities through uapi")
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    Acked-by: default avatarMáté Eckl <ecklm94@gmail.com>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    5a8de47b
    netfilter: bridge: define INT_MIN & INT_MAX in userspace
    Jiri Slaby authored
    
    
    With 4.19, programs like ebtables fail to build when they include
    "linux/netfilter_bridge.h". It is caused by commit 94276fa8 which
    added a use of INT_MIN and INT_MAX to the header:
    : In file included from /usr/include/linux/netfilter_bridge/ebtables.h:18,
    :                  from include/ebtables_u.h:28,
    :                  from communication.c:23:
    : /usr/include/linux/netfilter_bridge.h:30:20: error: 'INT_MIN' undeclared here (not in a function)
    :   NF_BR_PRI_FIRST = INT_MIN,
    :                     ^~~~~~~
    
    Define these constants by including "limits.h" when !__KERNEL__ (the
    same way as for other netfilter_* headers).
    
    Fixes: 94276fa8 ("netfilter: bridge: Expose nf_tables bridge hook priorities through uapi")
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    Acked-by: default avatarMáté Eckl <ecklm94@gmail.com>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Loading