NetBSD Problem Report #56781

From www@netbsd.org  Tue Apr  5 19:55:20 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1A05F1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  5 Apr 2022 19:55:20 +0000 (UTC)
Message-Id: <20220405195518.7CC651A923B@mollari.NetBSD.org>
Date: Tue,  5 Apr 2022 19:55:18 +0000 (UTC)
From: schinsp@wwu.edu
Reply-To: schinsp@wwu.edu
To: gnats-bugs@NetBSD.org
Subject: fuse.h does not compile
X-Send-Pr-Version: www-1.0

>Number:         56781
>Category:       misc
>Synopsis:       fuse.h does not compile
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 05 20:00:00 +0000 2022
>Last-Modified:  Tue Apr 05 23:55:01 +0000 2022
>Originator:     Peter Schinske
>Release:        9.2
>Organization:
Western Washington University
>Environment:
NetBSD localhost 9.2 NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When I try to compile any c program that includes the "fuse.h" header, it does not compile.

Here is the GCC output:

In file included from /usr/include/puffs.h:44:0,                                                  
                 from /usr/include/fuse.h:41,                                                     
                 from main.c:1:                                                                   
/usr/include/fs/puffs/puffs_msgif.h:595:2: error: unknown type name 'register_t'                  
  register_t  pvnr_retval;  /* IN */                                                              
  ^~~~~~~~~~                                                                                      
In file included from /usr/include/fuse.h:41:0,                                                   
                 from main.c:1:                                                                   
/usr/include/puffs.h:225:27: error: unknown type name 'register_t'; did you mean '__register_t'?  
      puffs_cookie_t, int, register_t *);                                                         
                           ^~~~~~~~~~                                                             
                           __register_t                                                           
/usr/include/puffs.h:436:1: error: unknown type name 'register_t'; did you mean '__register_t'?   
 PUFFSOP_PROTOS(puffs_null) /* XXX */                                                             
 ^                                                                                                
/usr/include/puffs.h:505:20: error: unknown type name 'vsize_t'; did you mean 'ssize_t'?          
        enum vtype, vsize_t, dev_t);                                                              
                    ^~~~~~~                                                                       
                    ssize_t                                                                       
>How-To-Repeat:
Compile this file, which I've called main.c, with the command "gcc main.c":

#include <fuse.h>

int main() {
}
>Fix:
Looks like this might be a simple case of some missing typedefs... presumably the header file just needs something like "typedef __register_t register_t".

Including sys/types.h in main.c does not fix the problem.

>Audit-Trail:
From: RVP <rvp@SDF.ORG>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/56781: fuse.h does not compile
Date: Tue, 5 Apr 2022 21:11:22 +0000 (UTC)

 This has been fixed in -HEAD, I think. For 9.2, you could use the
 (arguably wrong) hack that is used by some fuse-using code in pkgsrc:

 cc -D_KERNTYPES -D_NETBSD ...

 -RVP

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/56781: fuse.h does not compile
Date: Wed, 06 Apr 2022 04:34:10 +0700

     Date:        Tue,  5 Apr 2022 20:00:00 +0000 (UTC)
     From:        schinsp@wwu.edu
     Message-ID:  <20220405200000.EC2361A923C@mollari.NetBSD.org>

   | Including sys/types.h in main.c does not fix the problem.

 That should be enough, but register_t only gets defined if you have
 already defined (at least one of) _KERNEL _KMEMUSER _KERNTYPES or _STANDALONE

 The same is true of vsize_t (the other missing type in your message).

 Of those, _KERNTYPES is probably the one that might be most appropriate.
 (Compiling with -D_KERNTYPES on the cc command should be enough).

 kre

From: Christos Zoulas <christos@zoulas.com>
To: gnats-bugs@netbsd.org
Cc: misc-bug-people@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: misc/56781: fuse.h does not compile
Date: Tue, 5 Apr 2022 19:33:32 -0400

 What's wrong about changing the file to use __register_t?

 christos

From: RVP <rvp@SDF.ORG>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: misc/56781: fuse.h does not compile
Date: Tue, 5 Apr 2022 23:52:08 +0000 (UTC)

 On Tue, 5 Apr 2022, Christos Zoulas wrote:

 > What's wrong about changing the file to use __register_t?
 >

 That's one of the things that's been done in -HEAD (puffs.h)--along with
 changing vsize_t -> size_t.

 -RVP

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.