[Midnightbsd-cvs] [MidnightBSD/mports] c62ba9: net/samba419: fix MidnightBSD platform detection a...

Lucas Holt noreply at github.com
Sat Sep 19 23:47:59 EDT 2026


  Branch: refs/heads/net/samba419-midnightbsd
  Home:   https://github.com/MidnightBSD/mports
  Commit: c62ba935e14e5e8dca21b43925315d911f60fd0a
      https://github.com/MidnightBSD/mports/commit/c62ba935e14e5e8dca21b43925315d911f60fd0a
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-19 (Sat, 19 Sep 2026)

  Changed paths:
    A net/samba419/files/patch-nsswitch_wscript__build
    A net/samba419/files/patch-source3_wscript
    A net/samba419/files/patch-third__party_heimdal_kadmin_kadmin__locl.h
    A net/samba419/files/patch-third__party_heimdal_kcm_headers.h
    A net/samba419/files/patch-third__party_heimdal_kdc_headers.h
    A net/samba419/files/patch-third__party_heimdal_kpasswd_kpasswd__locl.h
    A net/samba419/files/patch-third__party_heimdal_lib_roken_rkpty.c

  Log Message:
  -----------
  net/samba419: fix MidnightBSD platform detection and libutil clash

Two MidnightBSD-specific build problems. Neither is enough on its own to
make samba419 build yet, but both are real and independent.

Platform detection:

samba dispatches on sys.platform, which is "midnightbsd4" here, using
substring tests like host_os.rfind('freebsd'). None of them match, so
MidnightBSD fell through every platform branch in source3/wscript and
nsswitch/wscript_build. Beyond the visible failure

  sendfile support not found but it was requested !

that also silently skipped the FREEBSD define, STAT_ST_BLOCKSIZE, the
sunacl.h check, and the winbind NSS plugin.

Rather than touch each of the freebsd tests, normalise host_os once after
each sys.platform assignment so the existing branches apply. MidnightBSD
is FreeBSD-derived, so taking those branches is correct. Configure now
reports "Checking for freebsd sendfile support: ok".

lib/replace/wscript and source4/ntvfs/sysdep/wscript_configure also read
sys.platform but never test for freebsd, so they need nothing.

libutil clash:

MidnightBSD's libutil.h declares easprintf() and evasprintf(), which
FreeBSD's does not. roken.h has already done

  #define evasprintf rk_evasprintf

by the time <libutil.h> is included, so libutil's declaration is renamed
into a conflicting one:

  /usr/include/libutil.h:155:6: error: conflicting types for 'rk_evasprintf'

The two are not interchangeable - heimdal's returns char * from
(const char *, va_list), libutil's returns int from (char **,
const char *, va_list) - so heimdal has to keep its own. Hide the macros
across the include with push_macro/pop_macro and restore them afterwards,
in all five headers that include <libutil.h>.

samba419 still does not build. With the platform fix in place the FreeBSD
branch now enables vfs_zfsacl, which needs ACE_INHERITED_ACE from
sunacl.h; mports has sysutils/libsunacl 1.0 and that constant arrived in
1.0.1. That update is the next step and is not included here.

AI-Assisted-by: Claude Opus 5 <noreply at anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSsgED5s7GPYJNb1HxuaU9
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list