- add -D_BSD_SOURCE so that deco calls lstat(2)
- remove _XOPEN_SOURCE definition ok sthen@
This commit is contained in:
parent
4e9ef24a50
commit
21713eb4a2
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2009/01/23 02:30:20 kevlo Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2009/01/29 10:28:06 kevlo Exp $
|
||||
|
||||
COMMENT= extract various archive file formats
|
||||
|
||||
V= 1.6
|
||||
ARCHIVE_V= 1.4
|
||||
DISTNAME= deco-${V}
|
||||
PKGNAME= deco-archive-${V}
|
||||
PKGNAME= deco-archive-${V}p0
|
||||
|
||||
CATEGORIES= archivers
|
||||
|
||||
@ -43,7 +43,7 @@ RUN_DEPENDS= ::archivers/arc \
|
||||
::audio/flac \
|
||||
::misc/rpm
|
||||
|
||||
MAKE_FLAGS= CC="${CC}"
|
||||
MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS} -D_BSD_SOURCE"
|
||||
|
||||
do-build:
|
||||
cd ${DECO} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} \
|
||||
|
12
archivers/deco/patches/patch-Makefile
Normal file
12
archivers/deco/patches/patch-Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1 2009/01/29 10:28:06 kevlo Exp $
|
||||
--- Makefile.orig Sat Jan 24 22:30:50 2009
|
||||
+++ Makefile Sat Jan 24 22:31:03 2009
|
||||
@@ -6,7 +6,7 @@ deco: $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
|
||||
|
||||
.c.o:
|
||||
- $(CC) -D _XOPEN_SOURCE=600 -D SHARE=\"$(SHARE)\" $(CFLAGS) -c $<
|
||||
+ $(CC) -D SHARE=\"$(SHARE)\" $(CFLAGS) -c $<
|
||||
|
||||
clean:
|
||||
rm -f deco *.o
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-fs_c,v 1.1.1.1 2009/01/23 02:30:20 kevlo Exp $
|
||||
--- fs.c.orig Thu Jan 22 15:44:22 2009
|
||||
+++ fs.c Thu Jan 22 15:55:17 2009
|
||||
@@ -25,8 +25,13 @@ enum type file_type(bool follow, const char *path)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
- if ((follow ? stat : lstat)(path, &st) == 0)
|
||||
- return S_ISDIR(st.st_mode) ? Dir : Other;
|
||||
+ if (follow) {
|
||||
+ if (stat(path, &st) == 0)
|
||||
+ return S_ISDIR(st.st_mode) ? Dir : Other;
|
||||
+ } else {
|
||||
+ if (lstat(path, &st) == 0)
|
||||
+ return S_ISDIR(st.st_mode) ? Dir : Other;
|
||||
+ }
|
||||
return errno == ENOENT ? None : (err(MSG_STAT, true, path), Unknown);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user