Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 746242

Summary: app-i18n/fbterm: Fails to build with USE=gpm
Product: Gentoo Linux Reporter: tonemgub
Component: Current packagesAssignee: CJK Team <cjk>
Status: UNCONFIRMED ---    
Severity: normal CC: alexey+gentoo, jstein
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch: Add missing header

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?