]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool.h: define INT_MAX for userland
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Fri, 4 Mar 2016 10:52:19 +0000 (11:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Mar 2016 21:10:37 +0000 (16:10 -0500)
commit93cb71aaccd90973d8fdc5bcba0155da80af9be1
tree371ad0004ce8f8f0158b9c5e066d5765faec9011
parent21eb4ddafeb53ae55fa1442efb01026d45559503
ethtool.h: define INT_MAX for userland

INT_MAX needs limits.h in userland.
When ethtool.h is included by a userland app, we got the following error:

.../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed':
.../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' undeclared (first use in this function)
  return speed <= INT_MAX || speed == SPEED_UNKNOWN
                  ^

Fixes: 0d982610f532 ("ethtool: make validate_speed accept all speeds between 0 and INT_MAX")
CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/ethtool.h