Skip to content

Commit

Permalink
ignore glibc specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
docteurklein committed Nov 18, 2018
1 parent 12a01a3 commit 0ee068c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ REGRESS = $(EXTENSION)

DATA = pipelinedb--1.0.0.sql
EXTRA_CLEAN = src/test/regress/expected/$(REGRESS).out src/test/regress/sql/$(REGRESS).sql
SHLIB_LINK += /usr/lib/libzmq.a -lstdc++
SHLIB_LINK += -lzmq -lstdc++ -fPIC

ifdef USE_PGXS
PG_CPPFLAGS += -I./include -I$(shell $(PG_CONFIG) --includedir)
Expand Down
4 changes: 4 additions & 0 deletions src/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*
*-------------------------------------------------------------------------
*/
#ifdef GLIBC
#include <execinfo.h>
#endif
#include <math.h>
#include <sys/resource.h>
#include <time.h>
Expand Down Expand Up @@ -126,6 +128,7 @@ ContQueryDatabaseMetadataSize(void)
void
debug_segfault(SIGNAL_ARGS)
{
#ifdef GLIBC
void *array[32];
size_t size = backtrace(array, 32);
fprintf(stderr, "Segmentation fault (PID %d)\n", MyProcPid);
Expand All @@ -134,6 +137,7 @@ debug_segfault(SIGNAL_ARGS)
fprintf(stderr, "query: %s\n", debug_query_string);
fprintf(stderr, "backtrace:\n");
backtrace_symbols_fd(array, size, STDERR_FILENO);
#endif

#ifdef SLEEP_ON_ASSERT

Expand Down

0 comments on commit 0ee068c

Please sign in to comment.