Navigation Menu

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

DragonflyBSD latest git fails to compile #5937

Closed
stormchaser3000 opened this issue Jun 6, 2017 · 4 comments
Closed

DragonflyBSD latest git fails to compile #5937

stormchaser3000 opened this issue Jun 6, 2017 · 4 comments
Labels
Bug Issues that were confirmed to be a bug

Comments

@stormchaser3000
Copy link

stormchaser3000 commented Jun 6, 2017

/home/stormchaser3000/minetest/src/porting.cpp: In function 'bool porting::getCurrentExecPath(char*, size_t)':
/home/stormchaser3000/minetest/src/porting.cpp:297:11: error: 'CTL_KERN' was not declared in this scope
  mib[0] = CTL_KERN;
           ^
/home/stormchaser3000/minetest/src/porting.cpp:298:11: error: 'KERN_PROC' was not declared in this scope
  mib[1] = KERN_PROC;
           ^
/home/stormchaser3000/minetest/src/porting.cpp:299:11: error: 'KERN_PROC_PATHNAME' was not declared in this scope
  mib[2] = KERN_PROC_PATHNAME;
           ^
/home/stormchaser3000/minetest/src/porting.cpp:302:39: error: 'sysctl' was not declared in this scope
  if (sysctl(mib, 4, buf, &len, NULL, 0) == -1)
                                       ^
gmake[2]: *** [src/CMakeFiles/minetest.dir/build.make:4743: src/CMakeFiles/minetest.dir/porting.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[ 89%] Building CXX object src/CMakeFiles/minetest.dir/rollback.cpp.o
gmake[1]: *** [CMakeFiles/Makefile2:199: src/CMakeFiles/minetest.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2
@sfan5 sfan5 added the Bug Issues that were confirmed to be a bug label Jun 6, 2017
@sfan5
Copy link
Member

sfan5 commented Jun 6, 2017

@nerzhul

@nerzhul
Copy link
Member

nerzhul commented Jun 6, 2017

A DragonflyBSD user wow, it's rare, better to use FreeBSD haha.

Function is bool getCurrentExecPath(char *buf, size_t len) which is not affected by any C++11 change @sfan5 :) it seems there are missing includes in original code from 2014.

Can you try on porting.cpp L28 to replace #if defined(FreeBSD) with

#if defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__DragonFly__)

I think it's just mismatch between inclusion and function usage :)

If it work i will push the fix to master this evening.

Thanks

@stormchaser3000
Copy link
Author

after the change it compiled just fine.

thanks

@sfan5 sfan5 closed this as completed Jun 6, 2017
@SmallJoker
Copy link
Member

Fixed in 6c55874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug
Projects
None yet
Development

No branches or pull requests

4 participants