Skip to content

Commit 913bdbf

Browse files
committed
libzpool: remove global libzpool includes
Only include the zfs headers where they're currently required to compile. Unfortunately, including zfs_ioctl.h in user space pulls in a bunch of internal zfs headers as a side effect. We'll need to move these structures in to a new shared header to avoid this. We should not need to add the LIBZPOOL_CPPFLAGS when building the zed, zinject, zpool, libzfs, ior libzfs_core. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17861
1 parent 99d7453 commit 913bdbf

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

lib/libspl/taskq.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@
2929
* Copyright (c) 2014 by Delphix. All rights reserved.
3030
*/
3131

32-
#include <sys/zfs_context.h>
32+
#include <sys/sysmacros.h>
33+
#include <sys/timer.h>
34+
#include <sys/types.h>
35+
#include <sys/thread.h>
36+
#include <sys/taskq.h>
37+
#include <sys/kmem.h>
3338

3439
int taskq_now;
3540
taskq_t *system_taskq;

lib/libzfs/libzfs_crypto.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
* Copyright 2020 Joyent, Inc.
2020
*/
2121

22-
#include <sys/zfs_context.h>
2322
#include <sys/fs/zfs.h>
2423
#include <sys/dsl_crypt.h>
2524
#include <libintl.h>

lib/libzpool/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ libzpool_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS)
44
libzpool_la_CFLAGS += $(ZLIB_CFLAGS)
55

66
libzpool_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
7-
libzpool_la_CPPFLAGS += -I$(srcdir)/include/os/@ac_system_l@/zfs
87
libzpool_la_CPPFLAGS += -DLIB_ZPOOL_BUILD
98

109
lib_LTLIBRARIES += libzpool.la

tests/zfs-tests/cmd/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/file_append %D%/file_check %D%/file_trunc
6060

6161

6262
scripts_zfs_tests_bin_PROGRAMS += %D%/libzfs_input_check
63-
%C%_libzfs_input_check_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include/os/@ac_system_l@/zfs
6463
%C%_libzfs_input_check_LDADD = \
6564
libzfs_core.la \
6665
libnvpair.la

tests/zfs-tests/cmd/ereports.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
#include <fcntl.h>
2323
#include <stdio.h>
2424
#include <libzfs.h>
25-
#include <sys/zfs_ioctl.h>
2625
#include <sys/nvpair.h>
2726
#include <sys/fm/protocol.h>
2827
#include <sys/fm/fs/zfs.h>
2928

29+
#define ZEVENT_NONBLOCK 0x1
30+
3031
/*
3132
* Command to output io and checksum ereport values, one per line.
3233
* Used by zpool_events_duplicates.ksh to check for duplicate events.

0 commit comments

Comments
 (0)