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

Build failure on OpenBSD: expected unqualified-id instead of fileno #259

Closed
bentley opened this issue Jun 26, 2018 · 2 comments
Closed

Build failure on OpenBSD: expected unqualified-id instead of fileno #259

bentley opened this issue Jun 26, 2018 · 2 comments

Comments

@bentley
Copy link

bentley commented Jun 26, 2018

OpenBSD 6.3 -current, with clang-6.0.0:

[27/210] /usr/ports/pobj/libosmium-2.14.0/bin/c++  -DOSMIUM_WITH_SPARSEHASH=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -isystem /usr/local/include -I/usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/include -O2 -pipe -g -DNDEBUG   -std=c++11 -pthread -MD -MT examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o -MF examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o.d -o examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o -c /usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/examples/osmium_read_with_progress.cpp
FAILED: examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o 
/usr/ports/pobj/libosmium-2.14.0/bin/c++  -DOSMIUM_WITH_SPARSEHASH=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -isystem /usr/local/include -I/usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/include -O2 -pipe -g -DNDEBUG   -std=c++11 -pthread -MD -MT examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o -MF examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o.d -o examples/CMakeFiles/osmium_read_with_progress.dir/osmium_read_with_progress.cpp.o -c /usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/examples/osmium_read_with_progress.cpp
In file included from /usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/examples/osmium_read_with_progress.cpp:23:
In file included from /usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/include/osmium/io/any_input.hpp:46:
In file included from /usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/include/osmium/io/any_compression.hpp:45:
/usr/ports/pobj/libosmium-2.14.0/libosmium-2.14.0/include/osmium/io/bzip2_compression.hpp:151:66: error: expected unqualified-id
                            osmium::io::detail::reliable_fsync(::fileno(m_file));
                                                                 ^
/usr/include/stdio.h:406:19: note: expanded from macro 'fileno'
#define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
                        ^
1 error generated.
ninja: build stopped: subcommand failed.
@joto
Copy link
Member

joto commented Jun 26, 2018

Looks like fileno is a macro on OpenBSD, so the :: throws it off. Try removing the :: in front of fileno and report back. If this fixes it, I'll change the code.

@bentley
Copy link
Author

bentley commented Jun 26, 2018

Removing :: does fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants