A testdir encounters a compilation error on FreeBSD 5.2.1: Several
type definitions are missing when <sys/ucred.h> and <sys/mount.h>
are included. Also, NGROUPS needs to be defined; it comes from
<sys/param.h>.

This patch fixes it.


2025-12-04  Bruno Haible  <[email protected]>

        file-remote: Fix compilation error on FreeBSD 5.2.1.
        * lib/file-remote.c [FreeBSD]: Before <sys/mount.h>, include
        <sys/types.h> and <sys/param.h>.

diff --git a/lib/file-remote.c b/lib/file-remote.c
index 33f69e2b65..98325554fa 100644
--- a/lib/file-remote.c
+++ b/lib/file-remote.c
@@ -30,6 +30,8 @@
 # include <sys/mount.h>
 #elif defined __FreeBSD__ || defined __DragonFly__ || defined 
__FreeBSD_kernel__
                                                      /* FreeBSD, GNU/kFreeBSD 
*/
+# include <sys/types.h>
+# include <sys/param.h>
 # include <sys/mount.h>
 #elif defined __NetBSD__                                    /* NetBSD */
 # include <sys/statvfs.h>




Reply via email to