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

Fix builds on glibc >= 2.38 #203

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All versions are tagged by the major Postgres version, plus an individual semver for this library itself.

## 15-4.2.3 2023-07-07

* Fix builds when compiling with `glibc >= 2.38` [#203](https://github.com/pganalyze/libpg_query/pull/203)
msepga marked this conversation as resolved.
Show resolved Hide resolved
* Deparser: Add support for COALESCE and other expressions in LIMIT clause [#199](https://github.com/pganalyze/libpg_query/pull/199)

## 15-4.2.2 2023-07-07

* Deparser:
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PG_VERSION = 15.1
PG_VERSION_MAJOR = $(call word-dot,$(PG_VERSION),1)
PROTOC_VERSION = 3.14.0

VERSION = 4.2.2
VERSION = 4.2.3
VERSION_MAJOR = $(call word-dot,$(VERSION),1)
VERSION_MINOR = $(call word-dot,$(VERSION),2)
VERSION_PATCH = $(call word-dot,$(VERSION),3)
Expand Down Expand Up @@ -148,7 +148,8 @@ $(PGDIR):
echo "#undef USE_ARMV8_CRC32C" >> $(PGDIR)/src/include/pg_config.h
echo "#undef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" >> $(PGDIR)/src/include/pg_config.h
# Ensure we don't fail on systems that have strchrnul support (FreeBSD and NetBSD)
echo "#if defined(__FreeBSD__) || defined(__NetBSD__)" >> $(PGDIR)/src/include/pg_config.h
echo "#include <stdlib.h>" >> $(PGDIR)/src/include/pg_config.h
echo "#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2))" >> $(PGDIR)/src/include/pg_config.h
echo "#define HAVE_STRCHRNUL" >> $(PGDIR)/src/include/pg_config.h
echo "#endif" >> $(PGDIR)/src/include/pg_config.h

Expand Down
3 changes: 2 additions & 1 deletion src/postgres/include/pg_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@
#undef HAVE__GET_CPUID
#undef USE_ARMV8_CRC32C
#undef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <stdlib.h>
#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2))
#define HAVE_STRCHRNUL
#endif
Loading