On 2026-Mar-15, Álvaro Herrera wrote:

> Hi,
> 
> This is what it would look like as a single commit.  It passes
> headerscheck and compiles clean for me.  CI run in progress:
> https://cirrus-ci.com/build/4615771982135296

Failed in an interesting fashion in macOS and FreeBSD:

[09:14:52.868] ccache cc -Isrc/backend/postgres_lib.a.p -Isrc/include 
-I../src/include -I/usr/local/include -I/usr/local/include/libxml2 
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g 
-fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wmissing-prototypes 
-Wpointer-arith -Werror=vla -Werror=unguarded-availability-new -Wendif-labels 
-Wmissing-format-attribute -Wcast-function-type -Wformat-security 
-Wimplicit-fallthrough -Wdeclaration-after-statement 
-Wmissing-variable-declarations -Wno-unused-command-line-argument 
-Wno-compound-token-split-by-macro -Wno-format-truncation 
-Wno-cast-function-type-strict -Og -ggdb -DRELCACHE_FORCE_RELEASE 
-DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS -fPIC -pthread -DBUILDING_DLL -MD 
-MQ src/backend/postgres_lib.a.p/storage_ipc_shmem.c.o -MF 
src/backend/postgres_lib.a.p/storage_ipc_shmem.c.o.d -o 
src/backend/postgres_lib.a.p/storage_ipc_shmem.c.o -c 
../src/backend/storage/ipc/shmem.c
[09:14:52.869] ../src/backend/storage/ipc/shmem.c:748:17: warning: call to 
undeclared function 'sysconf'; ISO C99 and later do not support implicit 
function declarations [-Wimplicit-function-declaration]
[09:14:52.869]   748 |         os_page_size = sysconf(_SC_PAGESIZE);
[09:14:52.869]       |                        ^
[09:14:52.869] ../src/backend/storage/ipc/shmem.c:748:25: error: use of 
undeclared identifier '_SC_PAGESIZE'
[09:14:52.869]   748 |         os_page_size = sysconf(_SC_PAGESIZE);
[09:14:52.869]       |                                ^
[09:14:52.869] 1 warning and 1 error generated.


AFAICS this is because shmem.c used to get #include <unistd.h>
indirectly through pg_iovec.h and no longer does.  Added that. Next run:
https://cirrus-ci.com/build/5651549315137536

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"It takes less than 2 seconds to get to 78% complete; that's a good sign.
A few seconds later it's at 90%, but it seems to have stuck there.  Did
somebody make percentages logarithmic while I wasn't looking?"
                http://smylers.hates-software.com/2005/09/08/1995c749.html


Reply via email to