Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix implicit declaration of statx gate helper function and includes #35

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Thaodan
Copy link
Contributor

@Thaodan Thaodan commented Oct 28, 2024

Fix implicit declaration of statx gate helper function and includes

  • i_virtualize_struct_statx was only implicitly defined in
    vterm_statfuns.c as config.h which defines HAVE_STATX wasn't included.
    Consistently include config.h before any other header to avoid issues

Fix expected ‘;’ before ‘typedef’

  • sys/cdefs wasn't included in the vendored copy of elf-utils elf.h

Include missing type headers

  • Similarly as the earlier commit above but for stdint.h

i_virtualize_struct_statx was only implicitly defined in
vterm_statfuns.c as config.h which defines HAVE_STATX wasn't included.
Consistently include config.h before any other header to avoid issues
like these:
preload/vperm_filestatgates.c: In function ‘statx_gate’:
preload/vperm_filestatgates.c:272:17: error: implicit declaration of function ‘i_virtualize_struct_statx’; did you mean ‘i_virtualize_struct_stat’? [-Wimplicit-function-declaration]
  272 |                 i_virtualize_struct_statx(realfnname, buf);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                 i_virtualize_struct_stat

Also use consistent include order and naming in all files.

Fixes: 0ecaef5 ([sb2] Add gate for statx. JB#49501)
Signed-off-by: Björn Bidar <[email protected]>

[sb2] Fix implicit declaration of function ‘i_virtualize_struct_statx’. Fixes JB#62739
include/elf.h:25:14: error: expected ‘;’ before ‘typedef’
   25 | __BEGIN_DECLS
      |              ^
      |              ;

Fixes: 055cb96 (Incomplete OS X support)
Signed-off-by: Björn Bidar <[email protected]>
Fixes errors such as:
include/rule_tree.h:22:9: error: unknown type name ‘uint32_t’
   22 | typedef uint32_t ruletree_object_offset_t;

Signed-off-by: Björn Bidar <[email protected]>
preload/vperm_statfuncts.c:122:5: warning: no previous prototype for ‘i_virtualize_struct_stat_internal’ [-Wmissing-prototypes]
 122 | int i_virtualize_struct_stat_internal(

Fixes: 0ecaef5 ([sb2] Add gate for statx. JB#49501)
Signed-off-by: Björn Bidar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant