Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 746242 - app-i18n/fbterm: Fails to build with USE=gpm
Summary: app-i18n/fbterm: Fails to build with USE=gpm
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-10-03 14:53 UTC by tonemgub
Modified: 2021-10-02 14:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch: Add missing header (file_746242.txt,403 bytes, text/plain)
2020-10-03 14:53 UTC, tonemgub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonemgub 2020-10-03 14:53:49 UTC
Created attachment 663610 [details]
Patch: Add missing header

Build fails due to missing header with the following:

mouse.cpp: In function 's32 open_gpm(Gpm_Connect*)':
mouse.cpp:58:2: error: 'memset' was not declared in this scope
   58 |  memset((s8 *)&addr, 0, sizeof(addr));
      |  ^~~~~~
mouse.cpp:39:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
   38 | #include "screen.h"
  +++ |+#include <cstring>
   39 | 
mouse.cpp:60:2: error: 'strncpy' was not declared in this scope
   60 |  strncpy(addr.sun_path, GPM_NODE_CTL, sizeof(addr.sun_path) - 1);
      |  ^~~~~~~
mouse.cpp:60:2: note: 'strncpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
mouse.cpp:43:6: warning: unused variable 'ret' [-Wunused-variable]
   43 |  s32 ret = ttyname_r(STDIN_FILENO, buf, sizeof(buf));
      |      ^~~
make[3]: *** [Makefile:570: fbterm-mouse.o] Error 1


Simply adding #include <cstring> resolves this issue.
Comment 1 Alexey 2020-10-03 15:12:01 UTC
Could you attach build.log and emerge --info?
Comment 2 Akinori Hattori gentoo-dev 2021-10-02 14:11:13 UTC
I cannot reproduce.