Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Failure to build 3.1rc3 on OpenBSD #3845

Closed
wzdev-ci opened this issue Dec 28, 2012 · 13 comments
Closed

Failure to build 3.1rc3 on OpenBSD #3845

wzdev-ci opened this issue Dec 28, 2012 · 13 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by brad@...


Warzone 2100 3.1rc3 fails to build on OpenBSD...

c++ -DHAVE_CONFIG_H -I. -I../..  -DYY_NO_INPUT -I/usr/local/include/SDL -D_REENTRANT -I/usr/X11R6/include -DXTHREADS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DNDEBUG -DWZ_DATADIR="\"/usr/local/share/warzone2100\"" -DLOCALEDIR="\"/usr/local/share/locale\"" -I../.. -I../../3rdparty -I../../3rdparty/quesoglc -DQT_SHARED -I/usr/local/include/X11/qt4 -I/usr/local/include/X11/qt4/QtNetwork -I/usr/local/include/X11/qt4/QtScript -I/usr/local/include/X11/qt4/QtCore -I/usr/X11R6/include -I/usr/local/include/libpng  -I/usr/local/include -g  -DQT_SHARED -I/usr/local/include/X11/qt4 -I/usr/local/include/X11/qt4/QtNetwork -I/usr/local/include/X11/qt4/QtScript -I/usr/local/include/X11/qt4/QtCore -O2 -pipe -fstack-protector -MT frameresource.o -MD -MP -MF .deps/frameresource.Tpo -c -o frameresource.o frameresource.cpp
frameresource.cpp: In function 'void resForceBaseDir(const char*)':
frameresource.cpp:94: error: 'strlcpy' was not declared in this scope
frameresource.cpp: In function 'void resSetBaseDir(const char*)':
frameresource.cpp:101: error: 'strlcpy' was not declared in this scope
frameresource.cpp: In function 'bool resLoad(const char*, SDWORD)':
frameresource.cpp:110: error: 'strlcpy' was not declared in this scope
frameresource.cpp: In function 'RES_TYPE* resAlloc(const char*)':
frameresource.cpp:165: error: 'strlcpy' was not declared in this scope
frameresource.cpp: In function 'void SetLastResourceFilename(const char*)':
frameresource.cpp:249: error: 'strlcpy' was not declared in this scope
frameresource.cpp: In function 'void makeLocaleFile(char*, size_t)':
frameresource.cpp:396: error: 'strlcpy' was not declared in this scope
frameresource.cpp: In function 'bool resLoadFile(const char*, const char*)':
frameresource.cpp:454: error: 'strlcpy' was not declared in this scope
frameresource.cpp:455: error: 'strlcat' was not declared in this scope
gmake[3]: *** [frameresource.o] Error 1

Issue migrated from trac:3845 at 2022-04-16 10:46:13 -0700

@wzdev-ci
Copy link
Contributor Author

Per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per changed resolution from `` to worksforme

@wzdev-ci
Copy link
Contributor Author

Per changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Per changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Per commented


None of us have an OpenBSD system, so we cannot really fix OpenBSD-specific problems. It looks like an include is missing that defines strlcpy and strlcat, as these are valid functions on OpenBSD but defined by us on other platforms. If you find a fix, please send a patch.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 7, 2013

anonymous commented


Judging from (Google for "openbsd man strlcpy")

#include <string.h>

should be sufficient. Can you try adding this include and see if it the compiles correctly?

@wzdev-ci
Copy link
Contributor Author

brad@... uploaded file warzone2100_configure.diff (0.7 KiB)

@wzdev-ci
Copy link
Contributor Author

brad@... commented


Attached is a patch that fixes the problem for *BSD OS's -- OpenBSD / NetBSD / DragonFly / Bitrig. You can't define _XOPEN_SOURCE otherwise it hides strlcpy().

@wzdev-ci
Copy link
Contributor Author

brad@... changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

brad@... changed resolution from worksforme to ``

@wzdev-ci
Copy link
Contributor Author

Cyp changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

Cyp changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp commented


"Auto"closing ticket...

commit 47a6d6d4684b993d15e378f6d0877fa043b26ca0
Author: Cyp
Date: Mon Jan 21 20:57:10 2013 +0100

Fix compile error on *BSD systems.

Patch by brad@comstyle.com.
Fixes #3845.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant