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

strcchrnul.c - error: use of undeclared identifier 'NULL' #6

Closed
tseemann opened this issue Feb 13, 2016 · 1 comment
Closed

strcchrnul.c - error: use of undeclared identifier 'NULL' #6

tseemann opened this issue Feb 13, 2016 · 1 comment

Comments

@tseemann
Copy link

This occurs on OSX compiler with both GCC and CLANG:

clang -DHAVE_CONFIG_H -I. -I../src   -I/usr/local/opt/libdivsufsort/include -I/usr/local/Cellar/gsl/1.16/include  -g -O2 -c -o reallocarray.o reallocarray.c
strchrnul.c:7:14: error: use of undeclared identifier 'NULL'
        return p != NULL ? p : strchr(s, '\0');

I'm guessing NULL is defined in stdio.h or stdlib.h and you have no #include in that C file.

@tseemann tseemann changed the title reallocarray.c - error: use of undeclared identifier 'NULL' strcchrnul.c - error: use of undeclared identifier 'NULL' Feb 13, 2016
kloetzl added a commit that referenced this issue Feb 13, 2016
This fixes issue #6
@kloetzl
Copy link
Collaborator

kloetzl commented Feb 13, 2016

That file is never compiled under linux, thus I didn't catch the error. Should be fixed now.

@kloetzl kloetzl closed this as completed Feb 13, 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

No branches or pull requests

2 participants