← Commit list

77216c368

Samuel Thibault
Samuel Thibault
2022-11-29
SUCCESS Duration: 156s

Subject

Fix non-Linux builds

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

Makefile.flags+1 -1
@@ -184,7 +184,7 @@ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%
endif
ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
-ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine)))
+ifneq (,$(findstring gnu,$(shell $(CC) $(CFLAGS) -dumpmachine)))
LDLIBS += resolv
endif
endif
console-tools/loadfont.c+1 -0
@@ -12,6 +12,7 @@
//config:config LOADFONT
//config: bool "loadfont (5.2 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: This program loads a console font from standard input.
//config:
console-tools/openvt.c+1 -0
@@ -10,6 +10,7 @@
//config:config OPENVT
//config: bool "openvt (7.2 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: This program is used to start a command on an unused
//config: virtual terminal.
coreutils/dd.c+18 -2
@@ -200,6 +200,7 @@ static void dd_output_status(int UNUSED_PARAM cur_signal)
}
#if ENABLE_FEATURE_DD_IBS_OBS
+# ifdef O_DIRECT
static int clear_O_DIRECT(int fd)
{
if (errno == EINVAL) {
@@ -211,6 +212,7 @@ static int clear_O_DIRECT(int fd)
}
return 0;
}
+# endif
#endif
static ssize_t dd_read(void *ibuf, size_t ibs)
@@ -225,8 +227,10 @@ static ssize_t dd_read(void *ibuf, size_t ibs)
#endif
n = safe_read(ifd, ibuf, ibs);
#if ENABLE_FEATURE_DD_IBS_OBS
+# ifdef O_DIRECT
if (n < 0 && (G.flags & FLAG_IDIRECT) && clear_O_DIRECT(ifd))
goto read_again;
+# endif
#endif
return n;
}
@@ -239,8 +243,10 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs,
IF_FEATURE_DD_IBS_OBS(write_again:)
n = full_write(ofd, buf, len);
#if ENABLE_FEATURE_DD_IBS_OBS
+# ifdef O_DIRECT
if (n < 0 && (G.flags & FLAG_ODIRECT) && clear_O_DIRECT(ofd))
goto write_again;
+# endif
#endif
#if ENABLE_FEATURE_DD_THIRD_STATUS_LINE
@@ -501,8 +507,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
if (infile) {
int iflag = O_RDONLY;
#if ENABLE_FEATURE_DD_IBS_OBS
- if (G.flags & FLAG_IDIRECT)
+ if (G.flags & FLAG_IDIRECT) {
+# ifdef O_DIRECT
iflag |= O_DIRECT;
+# else
+ bb_error_msg_and_die("O_DIRECT not supported on this platform");
+# endif
+ }
#endif
xmove_fd(xopen(infile, iflag), ifd);
} else {
@@ -516,8 +527,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
if (G.flags & FLAG_APPEND)
oflag |= O_APPEND;
#if ENABLE_FEATURE_DD_IBS_OBS
- if (G.flags & FLAG_ODIRECT)
+ if (G.flags & FLAG_ODIRECT) {
+# ifdef O_DIRECT
oflag |= O_DIRECT;
+# else
+ bb_error_msg_and_die("O_DIRECT not supported on this platform");
+# endif
+ }
#endif
xmove_fd(xopen(outfile, oflag), ofd);
klibc-utils/run-init.c+1 -0
@@ -8,6 +8,7 @@
//config:config RUN_INIT
//config: bool "run-init (7.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The run-init utility is used from initramfs to select a new
//config: root device. Under initramfs, you have to use this instead of
miscutils/adjtimex.c+1 -0
@@ -13,6 +13,7 @@
//config:config ADJTIMEX
//config: bool "adjtimex (4.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Adjtimex reads and optionally sets adjustment parameters for
//config: the Linux clock adjustment algorithm.
miscutils/i2c_tools.c+5 -0
@@ -11,30 +11,35 @@
//config:config I2CGET
//config: bool "i2cget (5.5 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Read from I2C/SMBus chip registers.
//config:
//config:config I2CSET
//config: bool "i2cset (6.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Set I2C registers.
//config:
//config:config I2CDUMP
//config: bool "i2cdump (7.1 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Examine I2C registers.
//config:
//config:config I2CDETECT
//config: bool "i2cdetect (7.1 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Detect I2C chips.
//config:
//config:config I2CTRANSFER
//config: bool "i2ctransfer (4.0 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Send user-defined I2C messages in one transfer.
//config:
miscutils/partprobe.c+1 -0
@@ -7,6 +7,7 @@
//config:config PARTPROBE
//config: bool "partprobe (3.5 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Ask kernel to rescan partition table.
miscutils/ubirename.c+1 -0
@@ -9,6 +9,7 @@
//config:config UBIRENAME
//config: bool "ubirename (2.4 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Utility to rename UBI volumes
miscutils/watchdog.c+1 -0
@@ -11,6 +11,7 @@
//config:config WATCHDOG
//config: bool "watchdog (5.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The watchdog utility is used with hardware or software watchdog
//config: device drivers. It opens the specified watchdog device special file
modutils/Config.src+1 -0
@@ -8,6 +8,7 @@ menu "Linux Module Utilities"
config MODPROBE_SMALL
bool "Simplified modutils"
default y
+ select PLATFORM_LINUX
help
Build smaller (~1.5 kbytes), simplified module tools.
modutils/depmod.c+1 -0
@@ -10,6 +10,7 @@
//config:config DEPMOD
//config: bool "depmod (27 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: depmod generates modules.dep (and potentially modules.alias
//config: and modules.symbols) that contain dependency information
modutils/insmod.c+1 -0
@@ -9,6 +9,7 @@
//config:config INSMOD
//config: bool "insmod (22 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: insmod is used to load specified modules in the running kernel.
modutils/lsmod.c+1 -0
@@ -10,6 +10,7 @@
//config:config LSMOD
//config: bool "lsmod (1.9 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: lsmod is used to display a list of loaded modules.
//config:
modutils/modinfo.c+1 -0
@@ -8,6 +8,7 @@
//config:config MODINFO
//config: bool "modinfo (24 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Show information about a Linux Kernel module
modutils/modprobe.c+1 -0
@@ -10,6 +10,7 @@
//config:config MODPROBE
//config: bool "modprobe (28 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Handle the loading of modules, and their dependencies on a high
//config: level.
modutils/rmmod.c+1 -0
@@ -10,6 +10,7 @@
//config:config RMMOD
//config: bool "rmmod (3.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: rmmod is used to unload specified modules from the kernel.
networking/arp.c+1 -0
@@ -15,6 +15,7 @@
//config:config ARP
//config: bool "arp (10 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Manipulate the system ARP cache.
networking/arping.c+1 -0
@@ -8,6 +8,7 @@
//config:config ARPING
//config: bool "arping (9 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Ping hosts by ARP packets.
networking/brctl.c+1 -0
@@ -12,6 +12,7 @@
//config:config BRCTL
//config: bool "brctl (4.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Manage ethernet bridges.
//config: Supports addbr/delbr and addif/delif.
networking/ifconfig.c+1 -0
@@ -27,6 +27,7 @@
//config:config IFCONFIG
//config: bool "ifconfig (12 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Ifconfig is used to configure the kernel-resident network interfaces.
//config:
networking/ifplugd.c+1 -0
@@ -9,6 +9,7 @@
//config:config IFPLUGD
//config: bool "ifplugd (10 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Network interface plug detection daemon.
networking/ip.c+6 -0
@@ -11,6 +11,7 @@
//config:config IP
//config: bool "ip (35 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The "ip" applet is a TCP/IP interface configuration and routing
//config: utility.
@@ -21,6 +22,7 @@
//config:config IPADDR
//config: bool "ipaddr (14 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select FEATURE_IP_ADDRESS
//config: help
//config: Short form of "ip addr"
@@ -28,6 +30,7 @@
//config:config IPLINK
//config: bool "iplink (17 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select FEATURE_IP_LINK
//config: help
//config: Short form of "ip link"
@@ -35,6 +38,7 @@
//config:config IPROUTE
//config: bool "iproute (15 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select FEATURE_IP_ROUTE
//config: help
//config: Short form of "ip route"
@@ -49,6 +53,7 @@
//config:config IPRULE
//config: bool "iprule (10 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select FEATURE_IP_RULE
//config: help
//config: Short form of "ip rule"
@@ -56,6 +61,7 @@
//config:config IPNEIGH
//config: bool "ipneigh (8.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select FEATURE_IP_NEIGH
//config: help
//config: Short form of "ip neigh"
networking/nameif.c+1 -0
@@ -12,6 +12,7 @@
//config:config NAMEIF
//config: bool "nameif (6.6 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select FEATURE_SYSLOG
//config: help
//config: nameif is used to rename network interface by its MAC address.
networking/route.c+1 -0
@@ -27,6 +27,7 @@
//config:config ROUTE
//config: bool "route (8.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Route displays or manipulates the kernel's IP routing tables.
networking/tc.c+1 -0
@@ -9,6 +9,7 @@
//config:config TC
//config: bool "tc (8.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Show / manipulate traffic control settings
//config:
networking/traceroute.c+2 -0
@@ -963,8 +963,10 @@ traceroute_init(int op, char **argv)
if (af == AF_INET) {
xmove_fd(xsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP), rcvsock);
#if ENABLE_FEATURE_TRACEROUTE_VERBOSE
+# ifdef IP_PKTINFO
/* want recvmsg to report target local address (for -v) */
setsockopt_1(rcvsock, IPPROTO_IP, IP_PKTINFO);
+# endif
#endif
}
#if ENABLE_TRACEROUTE6
networking/tunctl.c+1 -0
@@ -12,6 +12,7 @@
//config:config TUNCTL
//config: bool "tunctl (6.2 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: tunctl creates or deletes tun devices.
//config:
networking/udhcp/Config.src+3 -0
@@ -6,6 +6,7 @@
config UDHCPD
bool "udhcpd (21 kb)"
default y
+ select PLATFORM_LINUX
help
udhcpd is a DHCP server geared primarily toward embedded systems,
while striving to be fully functional and RFC compliant.
@@ -53,6 +54,7 @@ config DUMPLEASES
config DHCPRELAY
bool "dhcprelay (5.2 kb)"
default y
+ select PLATFORM_LINUX
help
dhcprelay listens for DHCP requests on one or more interfaces
and forwards these requests to a different interface or DHCP
@@ -61,6 +63,7 @@ config DHCPRELAY
config UDHCPC
bool "udhcpc (24 kb)"
default y
+ select PLATFORM_LINUX
help
udhcpc is a DHCP client geared primarily toward embedded systems,
while striving to be fully functional and RFC compliant.
procps/free.c+1 -0
@@ -9,6 +9,7 @@
//config:config FREE
//config: bool "free (3.1 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: free displays the total amount of free and used physical and swap
//config: memory in the system, as well as the buffers used by the kernel.
procps/uptime.c+1 -0
@@ -14,6 +14,7 @@
//config:config UPTIME
//config: bool "uptime (3.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: uptime gives a one line display of the current time, how long
//config: the system has been running, how many users are currently logged
sysklogd/klogd.c+1 -0
@@ -19,6 +19,7 @@
//config:config KLOGD
//config: bool "klogd (5.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: klogd is a utility which intercepts and logs all
//config: messages from the Linux kernel and sends the messages
util-linux/acpid.c+1 -0
@@ -9,6 +9,7 @@
//config:config ACPID
//config: bool "acpid (9 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: acpid listens to ACPI events coming either in textual form from
//config: /proc/acpi/event (though it is marked deprecated it is still widely
util-linux/blkdiscard.c+1 -0
@@ -8,6 +8,7 @@
//config:config BLKDISCARD
//config: bool "blkdiscard (4.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: blkdiscard discards sectors on a given device.
util-linux/blkid.c+1 -0
@@ -9,6 +9,7 @@
//config:config BLKID
//config: bool "blkid (12 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select VOLUMEID
//config: help
//config: Lists labels and UUIDs of all filesystems.
util-linux/dmesg.c+1 -0
@@ -11,6 +11,7 @@
//config:config DMESG
//config: bool "dmesg (3.7 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: dmesg is used to examine or control the kernel ring buffer. When the
//config: Linux kernel prints messages to the system log, they are stored in
util-linux/fdisk.c+1 -0
@@ -10,6 +10,7 @@
//config:config FDISK
//config: bool "fdisk (37 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The fdisk utility is used to divide hard disks into one or more
//config: logical disks, which are generally called partitions. This utility
util-linux/findfs.c+1 -0
@@ -10,6 +10,7 @@
//config:config FINDFS
//config: bool "findfs (12 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select VOLUMEID
//config: help
//config: Prints the name of a filesystem with given label or UUID.
util-linux/freeramdisk.c+2 -0
@@ -11,6 +11,7 @@
//config:config FDFLUSH
//config: bool "fdflush (1.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: fdflush is only needed when changing media on slightly-broken
//config: removable media drives. It is used to make Linux believe that a
@@ -23,6 +24,7 @@
//config:config FREERAMDISK
//config: bool "freeramdisk (1.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Linux allows you to create ramdisks. This utility allows you to
//config: delete them and completely free all memory that was used for the
util-linux/fsfreeze.c+1 -0
@@ -7,6 +7,7 @@
//config:config FSFREEZE
//config: bool "fsfreeze (3.5 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select LONG_OPTS
//config: help
//config: Halt new accesses and flush writes on a mounted filesystem.
util-linux/fstrim.c+1 -0
@@ -10,6 +10,7 @@
//config:config FSTRIM
//config: bool "fstrim (4.4 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Discard unused blocks on a mounted filesystem.
util-linux/hwclock.c+1 -0
@@ -9,6 +9,7 @@
//config:config HWCLOCK
//config: bool "hwclock (5.8 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The hwclock utility is used to read and set the hardware clock
//config: on a system. This is primarily used to set the current time on
util-linux/ionice.c+1 -0
@@ -9,6 +9,7 @@
//config:config IONICE
//config: bool "ionice (3.8 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Set/set program io scheduling class and priority
//config: Requires kernel >= 2.6.13
util-linux/losetup.c+1 -0
@@ -9,6 +9,7 @@
//config:config LOSETUP
//config: bool "losetup (5.5 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: losetup is used to associate or detach a loop device with a regular
//config: file or block device, and to query the status of a loop device. This
util-linux/mdev.c+1 -0
@@ -10,6 +10,7 @@
//config:config MDEV
//config: bool "mdev (17 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: mdev is a mini-udev implementation for dynamically creating device
//config: nodes in the /dev directory.
util-linux/mkfs_ext2.c+1 -0
@@ -10,6 +10,7 @@
//config:config MKE2FS
//config: bool "mke2fs (10 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Utility to create EXT2 filesystems.
//config:
util-linux/mkfs_vfat.c+1 -0
@@ -10,6 +10,7 @@
//config:config MKDOSFS
//config: bool "mkdosfs (7.2 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Utility to create FAT32 filesystems.
//config:
util-linux/mount.c+1 -0
@@ -20,6 +20,7 @@
//config:config MOUNT
//config: bool "mount (23 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: All files and filesystems in Unix are arranged into one big directory
//config: tree. The 'mount' utility is used to graft a filesystem onto a
util-linux/nsenter.c+1 -0
@@ -9,6 +9,7 @@
//config:config NSENTER
//config: bool "nsenter (6.5 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Run program with namespaces of other processes.
util-linux/pivot_root.c+1 -0
@@ -11,6 +11,7 @@
//config:config PIVOT_ROOT
//config: bool "pivot_root (1.1 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The pivot_root utility swaps the mount points for the root filesystem
//config: with some other mounted filesystem. This allows you to do all sorts
util-linux/setarch.c+3 -0
@@ -9,6 +9,7 @@
//config:config SETARCH
//config: bool "setarch (3.6 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The linux32 utility is used to create a 32bit environment for the
//config: specified program (usually a shell). It only makes sense to have
@@ -18,12 +19,14 @@
//config:config LINUX32
//config: bool "linux32 (3.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Alias to "setarch linux32".
//config:
//config:config LINUX64
//config: bool "linux64 (3.3 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Alias to "setarch linux64".
util-linux/setpriv.c+1 -0
@@ -9,6 +9,7 @@
//config:config SETPRIV
//config: bool "setpriv (6.6 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: select LONG_OPTS
//config: help
//config: Run a program with different Linux privilege settings.
util-linux/swaponoff.c+2 -0
@@ -9,6 +9,7 @@
//config:config SWAPON
//config: bool "swapon (15 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: Once you have created some swap space using 'mkswap', you also need
//config: to enable your swap space with the 'swapon' utility. The 'swapoff'
@@ -35,6 +36,7 @@
//config:config SWAPOFF
//config: bool "swapoff (14 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config:
//config:config FEATURE_SWAPONOFF_LABEL
//config: bool "Support specifying devices by label or UUID"
util-linux/switch_root.c+1 -0
@@ -9,6 +9,7 @@
//config:config SWITCH_ROOT
//config: bool "switch_root (5.5 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: The switch_root utility is used from initramfs to select a new
//config: root device. Under initramfs, you have to use this instead of
util-linux/uevent.c+1 -0
@@ -6,6 +6,7 @@
//config:config UEVENT
//config: bool "uevent (3.1 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: help
//config: uevent is a netlink listener for kernel uevent notifications
//config: sent via netlink. It is usually used for dynamic device creation.
util-linux/unshare.c+1 -0
@@ -9,6 +9,7 @@
//config:config UNSHARE
//config: bool "unshare (7.2 kb)"
//config: default y
+//config: select PLATFORM_LINUX
//config: depends on !NOMMU
//config: select LONG_OPTS
//config: help