Skip to content

Commit

Permalink
include <stdlib.h> where needed (#237)
Browse files Browse the repository at this point in the history
Changes by @bertschinger 
This fixes the build on a system where running `make check` has
build errors due to <stdlib.h> needing to be included in order
to use malloc(), free(), etc.
  • Loading branch information
bertschinger authored Nov 5, 2024
1 parent 3ef9c5c commit 7311689
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dal/testing/test_dal.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_fuzzing.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_fuzzing_put.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_oflags.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include <unistd.h>
#include <stdio.h>
#include <ftw.h>
#include <stdlib.h>

// WARNING: error-prone and ugly method of deleting files, written for simplicity only
// don't replicate this junk into ANY production code paths!
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_timer_abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/dal/testing/test_dal_timer_migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions src/io/testing/bufferfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>


// sentinel values to ensure good data transfer
Expand Down
1 change: 1 addition & 0 deletions src/io/testing/test_ioqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ GNU licenses can be found at http://www.gnu.org/licenses/.
#include "dal/dal.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>


// sentinel values to ensure good data transfer
Expand Down

0 comments on commit 7311689

Please sign in to comment.