Skip to content

Include cerrno header explictly #99

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

Merged
merged 1 commit into from
Feb 3, 2016
Merged

Conversation

Gasol
Copy link
Contributor

@Gasol Gasol commented Feb 3, 2016

It will fail to build in FreeBSD 9.3 if we don't require cerrno
header for using variable errno.

$ g++48 --version
g++48 (FreeBSD Ports Collection) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ root@9_3amd64-local:/usr/ports/devel/jsonnet # uname -a
FreeBSD 9_3amd64-local 9.3-RELEASE-p36 FreeBSD 9.3-RELEASE-p36 amd64

$ make
===>  Building for jsonnet-0.8.6
g++48 -c -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48
-fno-strict-aliasing -fPIC -Iinclude -std=c++11 core/libjsonnet.cpp
-o core/libjsonnet.o
core/libjsonnet.cpp: In function 'ImportStatus try_path(const string&,
const string&, std::string&, std::string&, std::string&)':
core/libjsonnet.cpp:112:28: error: 'errno' was not declared in this
scope
         err_msg = strerror(errno);
                            ^

It will fail to build in FreeBSD 9.3 if we don't require cerrno
header for using variable `errno`.

$ g++48 --version
g++48 (FreeBSD Ports Collection) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ root@9_3amd64-local:/usr/ports/devel/jsonnet # uname -a
FreeBSD 9_3amd64-local 9.3-RELEASE-p36 FreeBSD 9.3-RELEASE-p36 amd64

$ make
===>  Building for jsonnet-0.8.6
g++48 -c -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48
-fno-strict-aliasing -fPIC -Iinclude -std=c++11 core/libjsonnet.cpp
-o core/libjsonnet.o
core/libjsonnet.cpp: In function 'ImportStatus try_path(const string&,
const string&, std::string&, std::string&, std::string&)':
core/libjsonnet.cpp:112:28: error: 'errno' was not declared in this
scope
         err_msg = strerror(errno);
                            ^
sparkprime added a commit that referenced this pull request Feb 3, 2016
Include cerrno header explictly
@sparkprime sparkprime merged commit 45b238d into google:master Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants