mtd-utils: do not try to compile in support for ubifs ioctls and extended flags - some linux distros do not support this

SVN-Revision: 19846
master
Felix Fietkau 15 years ago
parent 20a64a738c
commit 9156e19ac0
  1. 2
      tools/mtd-utils/Makefile
  2. 8
      tools/mtd-utils/patches/110-portability.patch

@ -21,7 +21,7 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
CFLAGS := $(HOST_CFLAGS) -I$(HOST_BUILD_DIR)/include -L$(HOST_BUILD_DIR) -L$(STAGING_DIR_HOST)/lib CFLAGS := $(HOST_CFLAGS) -I$(HOST_BUILD_DIR)/include -L$(HOST_BUILD_DIR) -L$(STAGING_DIR_HOST)/lib -DNO_NATIVE_SUPPORT
ifneq ($(HOST_OS),Linux) ifneq ($(HOST_OS),Linux)
CFLAGS += -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h -I$(CURDIR)/include -include fls.h CFLAGS += -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h -I$(CURDIR)/include -include fls.h
endif endif

@ -92,7 +92,7 @@
if (c->default_compr != UBIFS_COMPR_NONE) if (c->default_compr != UBIFS_COMPR_NONE)
use_flags |= UBIFS_COMPR_FL; use_flags |= UBIFS_COMPR_FL;
+#ifdef __linux__ +#ifndef NO_NATIVE_SUPPORT
if (flags & FS_COMPR_FL) if (flags & FS_COMPR_FL)
use_flags |= UBIFS_COMPR_FL; use_flags |= UBIFS_COMPR_FL;
if (flags & FS_SYNC_FL) if (flags & FS_SYNC_FL)
@ -108,7 +108,7 @@
fd = dirfd(dir); fd = dirfd(dir);
if (fd == -1) if (fd == -1)
return sys_err_msg("dirfd failed"); return sys_err_msg("dirfd failed");
+#ifdef __linux__ +#ifndef NO_NATIVE_SUPPORT
if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1) if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1)
+#endif +#endif
flags = 0; flags = 0;
@ -118,7 +118,7 @@
key_write(&key, &dn->key); key_write(&key, &dn->key);
dn->size = cpu_to_le32(bytes_read); dn->size = cpu_to_le32(bytes_read);
out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ; out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ;
+#ifdef __linux__ +#ifndef NO_NATIVE_SUPPORT
if (c->default_compr == UBIFS_COMPR_NONE && if (c->default_compr == UBIFS_COMPR_NONE &&
(flags & FS_COMPR_FL)) (flags & FS_COMPR_FL))
use_compr = UBIFS_COMPR_LZO; use_compr = UBIFS_COMPR_LZO;
@ -131,7 +131,7 @@
if (fd == -1) if (fd == -1)
return sys_err_msg("failed to open file '%s'", return sys_err_msg("failed to open file '%s'",
path_name); path_name);
+#ifdef __linux__ +#ifndef NO_NATIVE_SUPPORT
if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1) if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1)
+#endif +#endif
flags = 0; flags = 0;

Loading…
Cancel
Save