Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
configure error section (zfs 0.6.5.7 on linux 4.7.1_2)
#!/bin/sh
# failing section from configure in /var/lib/dkms/zfs/0.6.5.7/build
export LINUX_OBJ=/usr/src/kernel-headers-4.7.1_2
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
int get(struct inode *ip, const char *name,
void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
};
int
main (void)
{
;
return 0;
}
_ACEOF
cat - <<_ACEOF >conftest.h
_ACEOF
mkdir -p build && touch build/conftest.mod.c
echo "obj-m := conftest.o" >build/Makefile
modpost_flag=''
cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.