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

Add missing include #407

Closed
wants to merge 1 commit into from
Closed

Conversation

Crayon2000
Copy link
Contributor

When compiling wut with powerpc-eabi-gcc (devkitPPC release 46) 14.2.0 I'm getting this error:

wut_reent.c
In file included from /opt/devkitpro/devkitPPC/powerpc-eabi/include/sys/errno.h:11,
                 from /workspaces/wut/libraries/wutnewlib/wut_newlib.h:4,
                 from /workspaces/wut/libraries/wutnewlib/wut_reent.c:1:
/workspaces/wut/libraries/wutnewlib/wut_reent.c: In function '__wut_getreent':
/workspaces/wut/libraries/wutnewlib/wut_reent.c:56:7: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
   56 |       _REENT_INIT_PTR(&context->reent);
      |       ^~~~~~~~~~~~~~~
/workspaces/wut/libraries/wutnewlib/wut_reent.c:6:1: note: include '<string.h>' or provide a declaration of 'memset'
    5 | #include <coreinit/thread.h>
  +++ |+#include <string.h>
    6 | 
make[1]: *** [/opt/devkitpro/devkitPPC/base_rules:21: wut_reent.o] Error 1
make: *** [Makefile:135: lib/libwut.a] Error 2

Toolchain info:

root@f74a9060e6a6:/workspaces/wut# /opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc --version
powerpc-eabi-gcc (devkitPPC release 46) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It's possible there is better fix, but I did what compiler told me 🙄

@WinterMute
Copy link
Member

fixed this in devkitPPC r46.1 headers instead.

@WinterMute WinterMute closed this Nov 11, 2024
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.

2 participants