Skip to content

Commit c59212f

Browse files
committed
fix: only add missing time.h include for Rocky Linux in build script
1 parent 7aafdaf commit c59212f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/build/build_libpq.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,13 @@ if [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "macos" ]; then
176176

177177
pushd "${sasl_dir}"
178178

179-
# Fix missing time.h include in multiple files for newer GCC versions
180-
sed -i.bak '/#include "saslint.h"/a\
179+
if [ "$ID" == "rocky" ]; then
180+
# Fix missing time.h include in multiple files for newer GCC versions
181+
sed -i.bak '/#include "saslint.h"/a\
181182
#include <time.h>' lib/saslutil.c
182-
sed -i.bak '/#include "plugin_common.h"/a\
183+
sed -i.bak '/#include "plugin_common.h"/a\
183184
#include <time.h>' plugins/cram.c
185+
fi
184186

185187
autoreconf -i
186188
./configure "${make_configure_standard_flags[@]}" --disable-macos-framework

0 commit comments

Comments
 (0)