Skip to content

Commit af7d6a5

Browse files
committed
Address Linux build errors caused by missing size_t definition
Also prevent warning due to calling free on a const char * in PDALLoadPipeline.
1 parent bde769f commit af7d6a5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

source/pdal/pdalc_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ namespace capi
4646
extern "C"
4747
{
4848
#else
49+
#include <stddef.h>
4950
#include <stdbool.h>
5051
#endif
5152
/**

tests/pdal/test_pdalc_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <stdlib.h>
3333
#include <stdio.h>
3434

35-
const char *PDALReadPipelineJson(const char *path)
35+
char *PDALReadPipelineJson(const char *path)
3636
{
3737
FILE *file = fopen(path, "rb");
3838
char *json = NULL;
@@ -64,7 +64,7 @@ const char *PDALReadPipelineJson(const char *path)
6464
PDALPipelinePtr *PDALLoadPipeline(const char *path)
6565
{
6666
PDALPipelinePtr *pipeline = NULL;
67-
const char *json = PDALReadPipelineJson(path);
67+
char *json = PDALReadPipelineJson(path);
6868

6969
if (json)
7070
{

tests/pdal/test_pdalc_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @param path The path to the PDAL pipeline JSON file
3939
* @return The contents of the PDAL pipeline JSON file as a string
4040
*/
41-
const char *PDALReadPipelineJson(const char *path);
41+
char *PDALReadPipelineJson(const char *path);
4242

4343
/**
4444
* Creates a PDAL pipeline from the provided path and attempts to execute it.

0 commit comments

Comments
 (0)