mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-08-08 09:21:48 +08:00
Address build warning
[libprotobuf WARNING protoc-gen-c/main.cc:44] `protoc-c` is deprecated. Please use `protoc` instead! Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
This commit is contained in:
+2
-2
@@ -18,9 +18,9 @@ require_cmd() {
|
||||
# Protocol buffers: ipc.proto and ctl.proto
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
PROTOC=$(command -v protoc-c 2>/dev/null || command -v protoc 2>/dev/null || true)
|
||||
PROTOC=$(command -v protoc 2>/dev/null || command -v protoc-c 2>/dev/null || true)
|
||||
if [ -z "$PROTOC" ]; then
|
||||
echo "dist-script: ERROR: protoc-c/protoc not found; install it to create a dist tarball" >&2
|
||||
echo "dist-script: ERROR: protoc/protoc-c not found; install it to create a dist tarball" >&2
|
||||
exit 1
|
||||
fi
|
||||
"$PROTOC" --c_out="$DISTROOT/src" \
|
||||
|
||||
+3
-3
@@ -38,9 +38,9 @@ endif
|
||||
# Required tools
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
gperf = find_program('gperf', required: false)
|
||||
protoc_c = find_program('protoc-c', required: false)
|
||||
ipcalc = find_program(['ipcalc', 'ipcalc-ng'], required: false)
|
||||
gperf = find_program('gperf', required: false)
|
||||
protoc = find_program(['protoc', 'protoc-c'], required: false)
|
||||
ipcalc = find_program(['ipcalc', 'ipcalc-ng'], required: false)
|
||||
|
||||
# Firewall script selection
|
||||
_fw_opt = get_option('firewall-script')
|
||||
|
||||
+4
-4
@@ -55,25 +55,25 @@ version_inc = configure_file(
|
||||
)
|
||||
|
||||
# Protocol buffers
|
||||
if protoc_c.found()
|
||||
if protoc.found()
|
||||
ipc_proto = custom_target('ipc-proto',
|
||||
input: 'ipc.proto',
|
||||
output: ['ipc.pb-c.c', 'ipc.pb-c.h'],
|
||||
command: [protoc_c, '--c_out=@OUTDIR@',
|
||||
command: [protoc, '--c_out=@OUTDIR@',
|
||||
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
|
||||
)
|
||||
ctl_proto = custom_target('ctl-proto',
|
||||
input: 'ctl.proto',
|
||||
output: ['ctl.pb-c.c', 'ctl.pb-c.h'],
|
||||
depends: ipc_proto,
|
||||
command: [protoc_c, '--c_out=@OUTDIR@',
|
||||
command: [protoc, '--c_out=@OUTDIR@',
|
||||
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
|
||||
)
|
||||
cfg_proto = custom_target('cfg-proto',
|
||||
input: 'cfg.proto',
|
||||
output: ['cfg.pb-c.c', 'cfg.pb-c.h'],
|
||||
depends: ipc_proto,
|
||||
command: [protoc_c, '--c_out=@OUTDIR@',
|
||||
command: [protoc, '--c_out=@OUTDIR@',
|
||||
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
|
||||
)
|
||||
elif fs.exists('ipc.pb-c.c') and fs.exists('ctl.pb-c.c') and fs.exists('cfg.pb-c.c')
|
||||
|
||||
Reference in New Issue
Block a user