OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_9-55-g1eac15a

Gerrit Code Review gerrit@openafs.org
Mon, 6 Feb 2023 10:57:16 -0500


The following commit has been merged in the openafs-stable-1_8_x branch:
commit 1eac15a85a50b1c322dd460f5c747538c88c1a31
Author: Cheyenne Wills <cwills@sinenomine.net>
Date:   Mon Jan 10 18:11:58 2022 -0700

    afs.h: fix out of tree build failures
    
    There are several compiler errors and warnings when building an out of
    tree program that includes "afs/afs.h".
    
     - Errors for unknown type names 'afs_ucred_t' and 'wait_queue_head'
        .../afs/afs.h:1542:16: error: unknown type name ‘afs_ucred_t’
          ... | afs_set_cr_uid(afs_ucred_t *cred, uid_t uid) {
        .../afs/afs.h:1605:5: error: unknown type name ‘wait_queue_head_t’
          ... |     wait_queue_head_t cond;
    
     - Warnings about declaring structures within missing declarations for
       the structs: osi_File, dcache and afs_FetchOutput
       .../afs/afs.h:1486:36: warning: ‘struct osi_file’ declared inside
            parameter list will not be visible outside of this definition or
            declaration
          ... |     int (*read)(void *rock, struct osi_file *tfile,
                         afs_uint32 offset,
    
     - Unable to find the file for the include opr/jhash.h
    
    The missing type name 'afs_ucred_t' is due to miss-placed declarations
    for some kernel only functions.
    
    The type name 'wait_queue_head' is a data type for Linux kernel modules.
    
    The warnings for the missing declarations are due to either references
    to the structures before they are declared, or because they are not
    available in any of the other public header files.
    
    To fix the unknown type name afs_ucred_t, relocate the function
    declarations that reference 'afs_ucred_t' into the KERNEL only section
    (since afs_ucred_t is a kernel specific type).
    
    To fix the unknown type name 'wait_queue_head', relocate the afs_event
    structure and the afs_evhasht variable to be within the KERNEL only
    section.
    
    To resolve the warnings associated with the structures, simply declare
    the structure names before they are referenced.  All references that
    are resulting in the warnings are declarations for pointers.
    
    Relocate the include for opr/jhash.h and the define for VCSIZE into the
    kernel block.
    
    Reviewed-on: https://gerrit.openafs.org/14857
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    (cherry picked from commit 92342b099dd5ea539efc5ad119d36a87647c0895)
    
    Change-Id: Ib321796e473495d7d8774133c5e690b53bb26c17
    Reviewed-on: https://gerrit.openafs.org/15299
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

 src/afs/afs.h | 157 ++++++++++++++++++++++++++++++----------------------------
 1 file changed, 81 insertions(+), 76 deletions(-)

-- 
OpenAFS Master Repository