Skip to content

[Bug]macOS上构建失败,F_SETPIPE_SZ未定义 #1993

@dongbeiouba

Description

@dongbeiouba

master分支代码编译错误:

/opt/homebrew/opt/llvm/bin/clang -c -pipe  -O -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wno-unused-parameter -Wno-deprecated-declarations -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I /opt/homebrew/Cellar/pcre2/10.44/include -I ../../Tongsuo-Project/Tongsuo/.openssl/include -I objs \
		-o objs/src/os/unix/ngx_pipe.o \
		src/os/unix/ngx_pipe.c
src/os/unix/ngx_pipe.c:443:31: error: use of undeclared identifier 'F_SETPIPE_SZ'
  443 |         if (fcntl(op->pfd[1], F_SETPIPE_SZ, ccf->pipe_size) == -1) {
      |                               ^
1 error generated.
make[1]: *** [objs/src/os/unix/ngx_pipe.o] Error 1
make: *** [build] Error 2

系统:macOS Sonoma 14.4
芯片:Apple M2 Pro
内核:Darwin Kernel Version 23.4.0

复现:

./configure --with-cc-opt="-I/opt/homebrew/opt/openssl@3/include" --with-ld-opt="-L/opt/homebrew/opt/openssl@3/lib -Wl,-rpath /opt/homebrew/opt/openssl@3/lib"

make -j1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions