Re: Can't comple 10 on FreeBSD 13.3

[email protected] (Christos Zoulas)
Newsgroups gmane.os.netbsd.ports.arm
Message-ID <[email protected]>
In article <[email protected]>,
Mori Hiroki  <[email protected]> wrote:
>Hi
>
>Happy release 10.
>
>I try compile on FreeBSD 13.3.
>
>I have build error on make tools.
>
>--- create.lo ---
>/usr/home/hiroki/netbsd-10/tools/mtree/../../usr.sbin/mtree/create.c:130:38:
>error: incompatible function pointer types passing 'int (const FTSENT
>*const *, const FTSENT *const *)' (aka 'int (const struct _ftsent *const
>*, const struct _ftsent *const *)') to parameter of type 'int (*)(const
>FTSENT **, const FTSENT **)' (aka 'int (*)(const struct _ftsent **,
>const struct _ftsent **)') [-Wincompatible-function-pointer-types]
>  130 |         if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL)
>      |                                             ^~~~
>/usr/home/hiroki/netbsd-10/tools/compat/../../include/fts.h:145:11:
>note: passing argument to parameter here
>  145 |     int (*)(const FTSENT **, const FTSENT **))  __RENAME(__fts_open60);
>      |           ^
>1 error generated.

Try this:

Index: create.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/mtree/create.c,v
retrieving revision 1.77
diff -u -p -r1.77 create.c
--- create.c    2 Dec 2023 13:34:48 -0000       1.77
+++ create.c    24 Apr 2024 01:41:34 -0000
@@ -84,7 +84,7 @@ static uid_t uid;
 static mode_t mode;
 static u_long flags;
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(HAVE_NBTOOL_CONFIG_H)
 #define        FTS_CONST const
 #else
 #define        FTS_CONST

christos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.