Skip to contentSkip to conversation

Add missing header files for source distribution

PATCH New Florian Fainelli 1 participant 1 message Oct 5, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing header files for source distribution

We were not listing all of the uapi header files in ethtool_SOURCES which prevented the proper construction of a distribution source tarball. This is noticeable with older kernel headers where the build would be breaking in such a way:

/storage/buildroot/output/arm64/host/bin/aarch64-linux-gcc -DHAVE_CONFIG_H -I. -I./uapi -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -D_POSIX_C_SOURCE=200809L -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=2 -std=gnu11 -c -o netlink/rings.o netlink/rings.c
In file included from internal.h:45,
from common.c:7:
./uapi/linux/ethtool.h:1507:19: warning: implicit declaration of function '__KERNEL_DIV_ROUND_UP' [-Wimplicit-function-declaration]

   __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
                    ^~~~~~~~~~~~~~~~~~~~~
./uapi/linux/ethtool.h:1507:8: error: variably modified 'queue_mask'
at file scope
   __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
         ^~~~~~~~~~

make[3]: *** [Makefile:1410: common.o] Error 1
make[3]: *** Waiting for unfinished jobs....

Fixes da2beb7afc25 ("update UAPI header copies")
---
 Makefile.am | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile.am +5 -1
index ae3b667696db..b9e06ad15889 100644
@@ -6,8 +6,12 @@ man_MANS = ethtool.8
 EXTRA_DIST = LICENSE ethtool.8 ethtool.spec.in aclocal.m4 ChangeLog autogen.sh
 
 sbin_PROGRAMS = ethtool
-ethtool_SOURCES = ethtool.c uapi/linux/ethtool.h internal.h \
+ethtool_SOURCES = ethtool.c uapi/linux/const.h uapi/linux/ethtool.h internal.h \
 		  uapi/linux/net_tstamp.h uapi/linux/if.h uapi/linux/hdlc/ioctl.h \
+		  uapi/linux/if_addr.h uapi/linux/if_ether.h uapi/linux/if_link.h \
+		  uapi/linux/libc-compat.h uapi/linux/net_tstamp.h uapi/linux/neighbour.h \
+		  uapi/linux/posix_types.h uapi/linux/rtnetlink.h uapi/linux/socket.h \
+		  uapi/linux/stddef.h uapi/linux/types.h \
 		  rxclass.c common.c common.h \
 		  json_writer.c json_writer.h json_print.c json_print.h \
 		  list.h
Signature · 1 line
2.34.1