Bug 204140 - ZFS's dsl_pool.c and spa_misc.c leak FreeBSD-specific kernel routines into userland libraries
Summary: ZFS's dsl_pool.c and spa_misc.c leak FreeBSD-specific kernel routines into us...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-30 07:17 UTC by Enji Cooper
Modified: 2018-01-13 07:18 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2015-10-30 07:17:40 UTC
/scratch/tmp/ngie/svn/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c: In function 'sysctl_zfs_dirty_data_max_percent':
/scratch/tmp/ngie/svn/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c:179: warning: implicit declaration of function 'sysctl_handle_int'
/scratch/tmp/ngie/svn/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c: In function 'sysctl_vfs_zfs_debug_flags':
/scratch/tmp/ngie/svn/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c:267: warning: implicit declaration of function 'sysctl_handle_int'

Spotted this while running make tinderbox on ref11-amd64.freebsd.org. The functions probably should only be exposed on FreeBSD and only when !_KERNEL.
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2015-10-30 07:18:52 UTC
(In reply to NGie Cooper from comment #0)

Also, there's the obvious "missing #include <sys/sysctl.h>" in the source files.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-11 13:17:43 UTC
A commit references this bug:

Author: smh
Date: Mon Apr 11 13:17:12 UTC 2016
New revision: 297819
URL: https://svnweb.freebsd.org/changeset/base/297819

Log:
  Only include sysctl in kernel build

  Only include sysctl in kernel builds fixing warning about implicit
  declaration of function 'sysctl_handle_int'.

  PR:		204140
  MFC after:	1 week
  X-MFC-With:	r297813
  Sponsored by:	Multiplay

Changes:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-01-13 07:18:42 UTC
A commit references this bug:

Author: cy
Date: Sat Jan 13 07:18:02 UTC 2018
New revision: 458892
URL: https://svnweb.freebsd.org/changeset/ports/458892

Log:
  Fix build with OPENLDAP and gdbm-compatibility.

  PR:		204140, 207687
  Submitted by:	Lawrence Chen <beastie@tardisi.com>

Changes:
  head/sysutils/am-utils/Makefile
  head/sysutils/am-utils/files/patch-configure.ac
  head/sysutils/am-utils/pkg-plist