mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
abec62a542
_LARGEFILE64_SOURCE has to be defined in the source, or CFLAGS can be used
to pass -D_LARGEFILE64_SOURCE to allow to keep using LFS64 definitions.
Fixes error in the form of:
restripe.c: In function 'restore_stripes':
restripe.c:758:43: error: 'off64_t' undeclared (first use in this function); did you mean 'off_t'?
758 | (off64_t)read_offset) {
| ^~~~~~~
| off_t
restripe.c:758:43: note: each undeclared identifier is reported only once for each function it appears in
restripe.c:758:51: error: expected ')' before 'read_offset'
758 | (off64_t)read_offset) {
| ^~~~~~~~~~~
| )
restripe.c:757:36: note: to match this '('
757 | if (lseek64(source, read_offset, 0) !=
| ^
make[3]: *** [Makefile:193: restripe.o] Error 1
Fixes: fff878c5bc
("toolchain/musl: update to 1.2.4")
Signed-off-by: Nick Hainke <vincent@systemli.org>
75 lines
1.8 KiB
Makefile
75 lines
1.8 KiB
Makefile
#
|
|
# Copyright (C) 2008-2012 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=mdadm
|
|
PKG_VERSION:=4.2
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
|
|
PKG_HASH:=461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d
|
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
PKG_CPE_ID:=cpe:/a:mdadm_project:mdadm
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_BUILD_FLAGS:=gc-sections
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/mdadm
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
SUBMENU:=Disc
|
|
TITLE:=A tool for managing Soft RAID under Linux
|
|
URL:=https://www.kernel.org/pub/linux/utils/raid/mdadm/
|
|
DEPENDS:=+libpthread +kmod-md-mod +kmod-md-raid0 +kmod-md-raid10 +kmod-md-raid1
|
|
endef
|
|
|
|
define Package/mdadm/description
|
|
A tool for managing Linux Software RAID arrays.
|
|
RAID 0, 1 and 10 support included.
|
|
If you need RAID 4,5 or 6 functionality please
|
|
install kmod-md-raid456 .
|
|
endef
|
|
|
|
define Package/mdadm/conffiles
|
|
/etc/config/mdadm
|
|
endef
|
|
|
|
TARGET_CFLAGS += \
|
|
-DHAVE_STDINT_H -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS \
|
|
-DCONFFILE='\"/var/etc/mdadm.conf\"' \
|
|
-DMAP_DIR='\"/var/run/mdadm\"' \
|
|
-DMDMON_DIR='\"/var/run/mdadm\"' \
|
|
-DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"' \
|
|
-DNO_LIBUDEV \
|
|
-D_LARGEFILE64_SOURCE
|
|
|
|
TARGET_CXFLAGS = -DNO_LIBUDEV
|
|
|
|
MAKE_FLAGS += \
|
|
CHECK_RUN_DIR=0 \
|
|
CXFLAGS="$(TARGET_CXFLAGS)"
|
|
|
|
define Build/Compile
|
|
$(call Build/Compile/Default,mdadm)
|
|
endef
|
|
|
|
define Package/mdadm/install
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) ./files/mdadm.config $(1)/etc/config/mdadm
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,mdadm))
|