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

ffi/posix: fix typo in cdecls #1983

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented Nov 21, 2024

This change is Reviewable

Copy link
Member

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The actual constant definition was okay, so this is just to avoid mishaps on future regens).

@benoit-pierre
Copy link
Contributor Author

Yeah, except we can't really regen from ffi-cdecl/posix_decl.c which is how that discrepancy got in. ;(

@Frenzie Frenzie merged commit 40eb9cd into koreader:master Nov 21, 2024
4 checks passed
@benoit-pierre
Copy link
Contributor Author

I have not investigated, but I get this error:

ffi-cdecl/posix_decl.c:331:1: error: ...-pc-linux-gnu-debug/staging/share/lua/5.1//gcc/cdecl.lua:30: attempt to call method 'value' (a nil value)
stack traceback:
        ...-pc-linux-gnu-debug/staging/share/lua/5.1//gcc/cdecl.lua:30: in function 'format_attributes'
        ...-pc-linux-gnu-debug/staging/share/lua/5.1//gcc/cdecl.lua:266: in function 'format_node_class'
        ...-pc-linux-gnu-debug/staging/share/lua/5.1//gcc/cdecl.lua:354: in function 'format'
        ...4-pc-linux-gnu-debug/staging/share/lua/5.1/ffi-cdecl.lua:71: in function <...4-pc-linux-gnu-debug/staging/share/lua/5.1/ffi-cdecl.lua:45>
  331 | cdecl_func(htons)
      | ^~~~~~~~~~

But not if I comment the cdecl_func(fopen) line…

@benoit-pierre benoit-pierre deleted the pr/fix_posix_cdecl_typo branch November 21, 2024 19:33
@NiLuJe
Copy link
Member

NiLuJe commented Nov 21, 2024

Yeah, I recall it being pissy about something, unless a chunk of it was commented out :/.

It never really made much sense to me either (but it did work at one point, so not sure whether it got broken by newer glibcs, or by newer GCCs...).

Been happening for quite a while, though.

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.

3 participants