On Tue, Mar 22, 2016 at 10:30:51PM +0100, Matthias Kilian wrote: > Hi, > > On Tue, Mar 22, 2016 at 04:20:34PM -0400, Bryan Steele wrote: > > It seems libarchive/bsdtar is picking up headers from e2fsprogs if > > installed, specifically, headers related to Linux file ioctls. > > > > ./ext2_fs.h:#define EXT2_IOC_GETFLAGS _IOR('f', 1, long) > > > > Here's a patch so that it stops trying random ioctls that > > fortunately all fail with our kernel. > > > > .. might be worth checking other ports. > > Well, no objections against your libarchive diff, but wouldn't it > be better to patch the offending header in e2fsprogs and shield > those #define's with #ifndef __OpenBSD__? > > If noone beats me, I'll give it a try in a day or two. > > Ciao, > Kili > > ps: i mean something like this (completely untested for now): > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/sysutils/e2fsprogs/Makefile,v > retrieving revision 1.36 > diff -u -p -r1.36 Makefile > --- Makefile 15 Dec 2015 10:52:02 -0000 1.36 > +++ Makefile 22 Mar 2016 21:29:19 -0000 > @@ -3,7 +3,7 @@ > COMMENT= utilities to manipulate ext2 filesystems > > DISTNAME= e2fsprogs-1.42.12 > -REVISION= 1 > +REVISION= 2 > CATEGORIES= sysutils devel > SHARED_LIBS= blkid 0.0 \ > com_err 21.0 \ > Index: patches/patch-lib_ext2fs_ext2_fs_h > =================================================================== > RCS file: patches/patch-lib_ext2fs_ext2_fs_h > diff -N patches/patch-lib_ext2fs_ext2_fs_h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-lib_ext2fs_ext2_fs_h 22 Mar 2016 21:29:19 -0000 > @@ -0,0 +1,19 @@ > +$OpenBSD$ > +--- lib/ext2fs/ext2_fs.h.orig Sat Aug 2 22:26:22 2014 > ++++ lib/ext2fs/ext2_fs.h Tue Mar 22 22:26:56 2016 > +@@ -344,6 +344,7 @@ struct ext4_new_group_input { > + #define _IOT_ext2_new_group_input _IOT (_IOTS(__u32), 5, _IOTS(__u16), 2, > 0, 0) > + #endif > + > ++#ifndef __OpenBSD__ > + #define EXT2_IOC_GETFLAGS _IOR('f', 1, long) > + #define EXT2_IOC_SETFLAGS _IOW('f', 2, long) > + #define EXT2_IOC_GETVERSION _IOR('v', 1, long) > +@@ -354,6 +355,7 @@ struct ext4_new_group_input { > + #define EXT2_IOC_GROUP_ADD _IOW('f', 8,struct ext2_new_group_input) > + #define EXT4_IOC_GROUP_ADD _IOW('f', 8,struct ext4_new_group_input) > + #define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64) > ++#endif > + > + /* > + * Structure of an inode on the disk
This works too, whichever is preferred. Or both. :-) ok brynet@ if it helps.