remove compatibility crap from libfuse which seems to break on uClibc, because of problems with versioned symbols
SVN-Revision: 6402
This commit is contained in:
		| @@ -93,6 +93,8 @@ define Build/Compile | |||||||
| 		ARCH="$(LINUX_KARCH)" \ | 		ARCH="$(LINUX_KARCH)" \ | ||||||
| 		CROSS_COMPILE="$(TARGET_CROSS)" \ | 		CROSS_COMPILE="$(TARGET_CROSS)" \ | ||||||
| 		DESTDIR="$(PKG_INSTALL_DIR)" \ | 		DESTDIR="$(PKG_INSTALL_DIR)" \ | ||||||
|  | 		AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \ | ||||||
|  | 		EXTRA_DIST="" \ | ||||||
| 		all install | 		all install | ||||||
| endef | endef | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										201
									
								
								package/fuse/patches/200-disable_compat.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										201
									
								
								package/fuse/patches/200-disable_compat.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,201 @@ | |||||||
|  | diff -ur fuse.old/include/fuse_common_compat.h fuse.dev/include/fuse_common_compat.h | ||||||
|  | --- fuse.old/include/fuse_common_compat.h	2006-09-22 21:30:16.000000000 +0200 | ||||||
|  | +++ fuse.dev/include/fuse_common_compat.h	2007-02-27 15:42:40.370284776 +0100 | ||||||
|  | @@ -17,6 +17,7 @@ | ||||||
|  |      unsigned int keep_cache : 1; | ||||||
|  |  }; | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  int fuse_mount_compat25(const char *mountpoint, struct fuse_args *args); | ||||||
|  |   | ||||||
|  |  int fuse_mount_compat22(const char *mountpoint, const char *opts); | ||||||
|  | @@ -24,4 +25,4 @@ | ||||||
|  |  int fuse_mount_compat1(const char *mountpoint, const char *args[]); | ||||||
|  |   | ||||||
|  |  void fuse_unmount_compat22(const char *mountpoint); | ||||||
|  | - | ||||||
|  | +#endif | ||||||
|  | diff -ur fuse.old/lib/fuse.c fuse.dev/lib/fuse.c | ||||||
|  | --- fuse.old/lib/fuse.c	2007-02-02 12:57:48.000000000 +0100 | ||||||
|  | +++ fuse.dev/lib/fuse.c	2007-02-27 15:46:09.721458560 +0100 | ||||||
|  | @@ -128,6 +128,7 @@ | ||||||
|  |  static pthread_mutex_t fuse_context_lock = PTHREAD_MUTEX_INITIALIZER; | ||||||
|  |  static int fuse_context_ref; | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  static int fuse_compat_open(struct fuse *, fuse_req_t, char *, | ||||||
|  |                              struct fuse_file_info *); | ||||||
|  |  static void fuse_compat_release(struct fuse *, fuse_req_t, char *, | ||||||
|  | @@ -135,6 +136,7 @@ | ||||||
|  |  static int fuse_compat_opendir(struct fuse *, fuse_req_t, char *, | ||||||
|  |                                 struct fuse_file_info *); | ||||||
|  |  static int fuse_compat_statfs(struct fuse *, fuse_req_t, struct statvfs *); | ||||||
|  | +#endif | ||||||
|  |   | ||||||
|  |  static struct node *get_node_nocheck(struct fuse *f, fuse_ino_t nodeid) | ||||||
|  |  { | ||||||
|  | @@ -1509,10 +1511,12 @@ | ||||||
|  |      pthread_rwlock_rdlock(&f->tree_lock); | ||||||
|  |      if (f->op.open) { | ||||||
|  |          err = -ENOENT; | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |          path = get_path(f, ino); | ||||||
|  |          if (path != NULL) | ||||||
|  |              err = fuse_compat_open(f, req, path, fi); | ||||||
|  | -    } | ||||||
|  | +#endif | ||||||
|  | +	} | ||||||
|  |      if (!err) { | ||||||
|  |          if (f->conf.debug) { | ||||||
|  |              printf("OPEN[%llu] flags: 0x%x\n", (unsigned long long) fi->fh, | ||||||
|  | @@ -1535,9 +1539,11 @@ | ||||||
|  |          if (fuse_reply_open(req, fi) == -ENOENT) { | ||||||
|  |              /* The open syscall was interrupted, so it must be cancelled */ | ||||||
|  |              pthread_mutex_unlock(&f->lock); | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |              if(f->op.release && path != NULL) | ||||||
|  |                  fuse_compat_release(f, req, path, fi); | ||||||
|  | -        } else { | ||||||
|  | +#endif | ||||||
|  | +		} else { | ||||||
|  |              get_node(f, ino)->open_count++; | ||||||
|  |              pthread_mutex_unlock(&f->lock); | ||||||
|  |          } | ||||||
|  | @@ -1661,8 +1667,10 @@ | ||||||
|  |      } | ||||||
|  |      if (fi->flush && path && f->op.flush) | ||||||
|  |          err = fuse_do_flush(f, req, path, fi); | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |      if (f->op.release) | ||||||
|  |          fuse_compat_release(f, req, path, fi); | ||||||
|  | +#endif | ||||||
|  |   | ||||||
|  |      pthread_mutex_lock(&f->lock); | ||||||
|  |      node = get_node(f, ino); | ||||||
|  | @@ -1753,12 +1761,14 @@ | ||||||
|  |   | ||||||
|  |          err = -ENOENT; | ||||||
|  |          pthread_rwlock_rdlock(&f->tree_lock); | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |          path = get_path(f, ino); | ||||||
|  |          if (path != NULL) { | ||||||
|  |              err = fuse_compat_opendir(f, req, path, &fi); | ||||||
|  |              dh->fh = fi.fh; | ||||||
|  |          } | ||||||
|  | -        if (!err) { | ||||||
|  | +#endif | ||||||
|  | +		if (!err) { | ||||||
|  |              if (fuse_reply_open(req, llfi) == -ENOENT) { | ||||||
|  |                  /* The opendir syscall was interrupted, so it must be | ||||||
|  |                     cancelled */ | ||||||
|  | @@ -2011,9 +2021,12 @@ | ||||||
|  |                  free(path); | ||||||
|  |              } | ||||||
|  |              pthread_rwlock_unlock(&f->tree_lock); | ||||||
|  | -        } else | ||||||
|  | +        } | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  | +		else | ||||||
|  |              err = fuse_compat_statfs(f, req, &buf); | ||||||
|  | -    } else | ||||||
|  | +#endif | ||||||
|  | +	} else | ||||||
|  |          err = default_statfs(&buf); | ||||||
|  |   | ||||||
|  |      if (!err) | ||||||
|  | @@ -2691,10 +2704,12 @@ | ||||||
|  |      f->conf.readdir_ino = 1; | ||||||
|  |  #endif | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |      if (compat && compat <= 25) { | ||||||
|  |          if (fuse_sync_compat_args(args) == -1) | ||||||
|  |              goto out_free; | ||||||
|  |      } | ||||||
|  | +#endif | ||||||
|  |   | ||||||
|  |      memcpy(&f->op, op, op_size); | ||||||
|  |      if (!f->op.lock) { | ||||||
|  | @@ -2824,6 +2839,7 @@ | ||||||
|  |      fuse_delete_context_key(); | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  #include "fuse_common_compat.h" | ||||||
|  |  #include "fuse_compat.h" | ||||||
|  |   | ||||||
|  | @@ -3037,3 +3053,5 @@ | ||||||
|  |  } | ||||||
|  |   | ||||||
|  |  __asm__(".symver fuse_new_compat25,fuse_new@FUSE_2.5"); | ||||||
|  | + | ||||||
|  | +#endif | ||||||
|  | diff -ur fuse.old/lib/fuse_lowlevel.c fuse.dev/lib/fuse_lowlevel.c | ||||||
|  | --- fuse.old/lib/fuse_lowlevel.c	2006-12-09 19:52:22.000000000 +0100 | ||||||
|  | +++ fuse.dev/lib/fuse_lowlevel.c	2007-02-27 15:32:35.903177744 +0100 | ||||||
|  | @@ -1297,6 +1297,7 @@ | ||||||
|  |  } | ||||||
|  |   | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  #ifndef __FreeBSD__ | ||||||
|  |   | ||||||
|  |  static void fill_open_compat(struct fuse_open_out *arg, | ||||||
|  | @@ -1422,3 +1423,4 @@ | ||||||
|  |  } | ||||||
|  |   | ||||||
|  |  __asm__(".symver fuse_lowlevel_new_compat25,fuse_lowlevel_new@FUSE_2.5"); | ||||||
|  | +#endif | ||||||
|  | diff -ur fuse.old/lib/helper.c fuse.dev/lib/helper.c | ||||||
|  | --- fuse.old/lib/helper.c	2006-12-09 19:52:22.000000000 +0100 | ||||||
|  | +++ fuse.dev/lib/helper.c	2007-02-27 15:35:17.340635520 +0100 | ||||||
|  | @@ -195,7 +195,7 @@ | ||||||
|  |                                             struct fuse_args *args) | ||||||
|  |  { | ||||||
|  |      struct fuse_chan *ch; | ||||||
|  | -    int fd = fuse_mount_compat25(mountpoint, args); | ||||||
|  | +    int fd = fuse_kern_mount(mountpoint, args); | ||||||
|  |      if (fd == -1) | ||||||
|  |          return NULL; | ||||||
|  |   | ||||||
|  | @@ -338,6 +338,7 @@ | ||||||
|  |      return -1; | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  #include "fuse_compat.h" | ||||||
|  |   | ||||||
|  |  #ifndef __FreeBSD__ | ||||||
|  | @@ -431,3 +432,4 @@ | ||||||
|  |  __asm__(".symver fuse_teardown_compat22,fuse_teardown@FUSE_2.2"); | ||||||
|  |  __asm__(".symver fuse_main_real_compat25,fuse_main_real@FUSE_2.5"); | ||||||
|  |  __asm__(".symver fuse_mount_compat25,fuse_mount@FUSE_2.5"); | ||||||
|  | +#endif | ||||||
|  | diff -ur fuse.old/lib/mount.c fuse.dev/lib/mount.c | ||||||
|  | --- fuse.old/lib/mount.c	2007-01-02 18:10:33.000000000 +0100 | ||||||
|  | +++ fuse.dev/lib/mount.c	2007-02-27 15:40:13.645590320 +0100 | ||||||
|  | @@ -219,11 +219,16 @@ | ||||||
|  |      waitpid(pid, NULL, 0); | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  void fuse_unmount_compat22(const char *mountpoint) | ||||||
|  |  { | ||||||
|  |      fuse_kern_unmount(mountpoint, -1); | ||||||
|  |  } | ||||||
|  | +#endif | ||||||
|  |   | ||||||
|  | +#ifdef DISABLE_COMPAT | ||||||
|  | +static | ||||||
|  | +#endif | ||||||
|  |  int fuse_mount_compat22(const char *mountpoint, const char *opts) | ||||||
|  |  { | ||||||
|  |      int fds[2], pid; | ||||||
|  | @@ -304,5 +309,7 @@ | ||||||
|  |      return res; | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | +#ifndef DISABLE_COMPAT | ||||||
|  |  __asm__(".symver fuse_mount_compat22,fuse_mount@FUSE_2.2"); | ||||||
|  |  __asm__(".symver fuse_unmount_compat22,fuse_unmount@FUSE_2.2"); | ||||||
|  | +#endif | ||||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau