]> granicus.if.org Git - sysstat/commitdiff
sar: Don't use IFNAMSIZ value from <net/if.h>
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 6 Feb 2021 08:11:08 +0000 (09:11 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 6 Feb 2021 08:11:08 +0000 (09:11 +0100)
IFNAMSIZ value is used to set the maximum length of the network
interface name, and for the definition of structures used to save
data in the binary data files (saDD).
We cannot allow that a new kernel value for IFNAMSIZ changes the format
of saDD binary data files. So now use a constant value of 16 (which is
the present value of IFNAMSIZ).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
rd_stats.h

index 9797fb19871c50d776fc277d8b766a0d8903f6b7..8e401bd963176ada61ae95f4bb8a42705eac1ca1 100644 (file)
  ***************************************************************************
  */
 
-/* Get IFNAMSIZ */
-#include <net/if.h>
-#ifndef IFNAMSIZ
-#define IFNAMSIZ       16
-#endif
-
 /* Maximum length of block device name */
 #define MAX_DEV_LEN    128
 /* Maximum length of network interface name */
-#define MAX_IFACE_LEN  IFNAMSIZ
+#define MAX_IFACE_LEN  16
 /* Maximum length of USB manufacturer string */
 #define MAX_MANUF_LEN  24
 /* Maximum length of USB product string */