On Thu, Feb 15, 2018 at 11:04:49AM -0800, Omar Sandoval wrote: > --- /dev/null > +++ b/libbtrfsutil/subvolume.c > @@ -0,0 +1,127 @@ > +/* > + * Copyright (C) 2018 Facebook > + * > + * This file is part of libbtrfsutil. > + * > + * libbtrfsutil is free software: you can redistribute it and/or modify > + * it under the terms of the GNU Lesser General Public License as published > by > + * the Free Software Foundation, either version 3 of the License, or > + * (at your option) any later version. > + * > + * libbtrfsutil is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public License > + * along with libbtrfsutil. If not, see <http://www.gnu.org/licenses/>. > + */ > + > +#include <errno.h> > +#include <fcntl.h> > +#include <unistd.h> > +#include <sys/ioctl.h> > +#include <sys/stat.h> > +#include <sys/types.h> > +#include <sys/vfs.h> > +#include <linux/btrfs.h> > +#include <linux/btrfs_tree.h>
How is this supposed to work? This pulls the system-wide includes, the travis-ci environment has an old kernel and btrfs_tree.h does not exist there. The missing defines are provided by libbtrfs' btrfs/ctree.h. We can add a configure-time check to detect the availability of the headers, but I'm not sure if this is right. As libbtrfsutil/subvolume.c is built internally it should use the includes from the btrfs-progs git itself, no? Ie. the #ifdef BTRFS_FLAT_INCLUDES way is not necessary for non-exported sources. > +#include <linux/magic.h> > + > +#include "btrfsutil_internal.h" All the include magic could be easily hidden inside this internal header so we won't need to include anything from the linux/* namespace directly. I'll keep this patch merged and unmodified, as it works on my machine, so any fix shall be an incremental on top of devel. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html