You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
ext2fuse: Fix implicit func decls, use of wrong lib
Closes: https://trac.macports.org/ticket/69997
This commit is contained in:
+12
-5
@@ -13,8 +13,8 @@ description ext2 filesystem in user space
|
||||
long_description Implementation of the ext2 filesystem in user space, \
|
||||
using the FUSE library.
|
||||
|
||||
homepage http://ext2fuse.sourceforge.net/
|
||||
master_sites sourceforge
|
||||
homepage https://sourceforge.net/projects/ext2fuse/
|
||||
master_sites sourceforge:project/${name}/${name}/${version}
|
||||
distname ${name}-src-${version}
|
||||
|
||||
checksums rmd160 7ba8c6f88550d1dcf4de235ab39dd13249e36eea \
|
||||
@@ -23,9 +23,16 @@ checksums rmd160 7ba8c6f88550d1dcf4de235ab39dd13249e36eea \
|
||||
|
||||
depends_lib-append port:e2fsprogs
|
||||
|
||||
patchfiles implicit.patch \
|
||||
_XOPEN_SOURCE.patch
|
||||
|
||||
configure.cflags-append -std=gnu89
|
||||
configure.cflags-append -D__FreeBSD__=10
|
||||
configure.cflags-append -I${prefix}/include/osxfuse/fuse
|
||||
configure.cflags-append -DENABLE_SWAPFS
|
||||
configure.cppflags -I${prefix}/include/osxfuse/fuse
|
||||
configure.ldflags-append -losxfuse
|
||||
configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include
|
||||
|
||||
pre-configure {
|
||||
# The configure script only knows about -lfuse which works for macFUSE but
|
||||
# not for OSXFUSE. This adds the right library flag, whichever port is used.
|
||||
configure.ldflags-append [exec ${prefix}/bin/pkg-config fuse --libs]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Setting _XOPEN_SOURCE hides certain functions. Setting it to 500 hides strdup:
|
||||
|
||||
error: implicitly declaring library function 'strdup' with type 'char *(const char *)' [-Werror,-Wimplicit-function-declaration]
|
||||
|
||||
Raising it to 600 fixes that but hides getpagesize:
|
||||
|
||||
error: implicit declaration of function 'getpagesize' [-Werror,-Wimplicit-function-declaration]
|
||||
|
||||
Therefore, don't set it at all so that nothing is hidden.
|
||||
--- lib/ext2fs/tdb.c.orig 2008-06-26 00:34:50.000000000 -0500
|
||||
+++ lib/ext2fs/tdb.c 2024-05-16 09:53:55.000000000 -0500
|
||||
@@ -39,7 +39,6 @@
|
||||
#define HAVE_UTIME_H
|
||||
#define HAVE_UTIME
|
||||
#endif
|
||||
-#define _XOPEN_SOURCE 500
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
@@ -0,0 +1,14 @@
|
||||
Fix:
|
||||
|
||||
error: implicit declaration of function 'check_perms_in_inode' [-Werror,-Wimplicit-function-declaration]
|
||||
--- src/ext2fs.h 2008-06-26 00:34:50.000000000 -0500
|
||||
+++ src/ext2fs.h 2024-05-16 10:05:06.000000000 -0500
|
||||
@@ -87,6 +87,8 @@
|
||||
|
||||
int check_perms(perms_struct, ext2_ino_t ino,
|
||||
int perms_requested);
|
||||
+int check_perms_in_inode(perms_struct ps, struct ext2_inode *inode,
|
||||
+ int perms_requested);
|
||||
int set_perms(perms_struct ps, struct ext2_inode *inode);
|
||||
|
||||
/* ext2fs.c */
|
||||
Reference in New Issue
Block a user