Build broken on OpenBSD with clang
Build with clang is broken on OpenBSD-current due to missing header inclusion:
/home/je/src/other/openmw/bin/c++ -DBOOST_NO_CXX11_SCOPED_ENUMS=ON -D__STDC_CONSTANT_MACROS -isystem /usr/local/include -I../. -isystem /usr/local/include/SDL2 -isystem /usr/local/include/MYGUI -isystem /usr/local/include/AL -isystem /usr/local/include/bullet -O2 -pipe -I/usr/X11R6/include -pthread -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long -Wno-potentially-evaluated-expression -DNDEBUG -MD -MT apps/openmw/CMakeFiles/openmw.dir/main.cpp.o -MF apps/openmw/CMakeFiles/openmw.dir/main.cpp.o.d -o apps/openmw/CMakeFiles/openmw.dir/main.cpp.o -c /home/je/src/other/openmw/openmw/apps/openmw/main.cpp /home/je/src/other/openmw/openmw/apps/openmw/main.cpp:360:14: error: use of undeclared identifier 'isatty' if (!isatty(fileno(stdin))) ^ 1 error generated. ninja: build stopped: subcommand failed.
There is a patch by Marc Espie that fixes this issue (from https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/games/openmw/patches/patch-apps_openmw_main_cpp):
Index: apps/openmw/main.cpp --- apps/openmw/main.cpp.orig +++ apps/openmw/main.cpp @@ -1,5 +1,6 @@ #include #include +#include <unistd.h>
#include <components/version/version.hpp> #include <components/files/configurationmanager.hpp>
(RM-4002 from redmine: created on 2017-08-06 by Juha Erkkilä, , closed on 2017-08-06 by Miroslav Remák)
Attachments: patch-apps_openmw_main_cpp