[BugFix] Fix compile error in GCC-14 (#50577)

Signed-off-by: stdpain <drfeng08@gmail.com>
This commit is contained in:
stdpain 2024-09-03 15:16:39 +08:00 committed by GitHub
parent fc11e558c9
commit 2d67753fbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 308 additions and 47 deletions

View File

@ -625,6 +625,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-switch-default")
endif ()
else ()
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0.0")
# ignore error from apache-orc
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-error=dangling-reference")
endif ()
set(CXX_GCC_FLAGS "${CXX_GCC_FLAGS} -fcoroutines")
endif()

View File

@ -57,7 +57,7 @@ public:
ColumnBuilder(DataColumnPtr column, NullColumnPtr null_column, bool has_null)
: _column(std::move(column)), _null_column(std::move(null_column)), _has_null(has_null) {}
//do nothing ctor, members are initialized by its offsprings.
explicit ColumnBuilder<Type>(void*) {}
explicit ColumnBuilder(void*) {}
void append(const DatumType& value) {
_null_column->append(DATUM_NOT_NULL);

View File

@ -525,8 +525,10 @@ struct ChunkSliceTemplate {
template <LogicalType ltype>
struct GetContainer {
using ColumnType = typename RunTimeTypeTraits<ltype>::ColumnType;
const auto& get_data(const Column* column) { return ColumnHelper::as_raw_column<ColumnType>(column)->get_data(); }
const auto& get_data(const ColumnPtr& column) {
static const auto& get_data(const Column* column) {
return ColumnHelper::as_raw_column<ColumnType>(column)->get_data();
}
static const auto& get_data(const ColumnPtr& column) {
return ColumnHelper::as_raw_column<ColumnType>(column.get())->get_data();
}
};
@ -534,10 +536,10 @@ struct GetContainer {
#define GET_CONTAINER(ltype) \
template <> \
struct GetContainer<ltype> { \
const auto& get_data(const Column* column) { \
static const auto& get_data(const Column* column) { \
return ColumnHelper::as_raw_column<BinaryColumn>(column)->get_proxy_data(); \
} \
const auto& get_data(const ColumnPtr& column) { \
static const auto& get_data(const ColumnPtr& column) { \
return ColumnHelper::as_raw_column<BinaryColumn>(column.get())->get_proxy_data(); \
} \
};

View File

@ -1171,7 +1171,7 @@ public:
if constexpr (HasNull) {
elements_nulls = elements_null_col->get_data().data();
}
const auto& elements_data = GetContainer<ElementType>().get_data(elements);
const auto& elements_data = GetContainer<ElementType>::get_data(elements);
auto* offsets_ptr = offsets->get_data().data();
auto* null_ptr = null_cols->get_data().data();

View File

@ -85,7 +85,7 @@ void VectorizedInConstPredicateBuilder::add_values(const ColumnPtr& column, size
case LogicalType::FIELD_TYPE: { \
using ColumnType = typename RunTimeTypeTraits<FIELD_TYPE>::ColumnType; \
auto* in_pred = (VectorizedInConstPredicate<FIELD_TYPE>*)(expr); \
const auto& data_ptr = GetContainer<FIELD_TYPE>().get_data(column); \
const auto& data_ptr = GetContainer<FIELD_TYPE>::get_data(column); \
if (in_pred->is_use_array()) { \
for (size_t j = column_offset; j < data_ptr.size(); j++) { \
in_pred->insert_array(data_ptr[j]); \
@ -103,34 +103,34 @@ void VectorizedInConstPredicateBuilder::add_values(const ColumnPtr& column, size
}
} else {
switch (type) {
#define M(FIELD_TYPE) \
case LogicalType::FIELD_TYPE: { \
using ColumnType = typename RunTimeTypeTraits<FIELD_TYPE>::ColumnType; \
auto* in_pred = (VectorizedInConstPredicate<FIELD_TYPE>*)(expr); \
auto* nullable_column = ColumnHelper::as_raw_column<NullableColumn>(column); \
const auto& data_array = GetContainer<FIELD_TYPE>().get_data(nullable_column->data_column()); \
if (in_pred->is_use_array()) { \
for (size_t j = column_offset; j < data_array.size(); j++) { \
if (!nullable_column->is_null(j)) { \
in_pred->insert_array(data_array[j]); \
} else { \
if (_eq_null) { \
in_pred->insert_null(); \
} \
} \
} \
} else { \
for (size_t j = column_offset; j < data_array.size(); j++) { \
if (!nullable_column->is_null(j)) { \
in_pred->insert(data_array[j]); \
} else { \
if (_eq_null) { \
in_pred->insert_null(); \
} \
} \
} \
} \
break; \
#define M(FIELD_TYPE) \
case LogicalType::FIELD_TYPE: { \
using ColumnType = typename RunTimeTypeTraits<FIELD_TYPE>::ColumnType; \
auto* in_pred = (VectorizedInConstPredicate<FIELD_TYPE>*)(expr); \
auto* nullable_column = ColumnHelper::as_raw_column<NullableColumn>(column); \
const auto& data_array = GetContainer<FIELD_TYPE>::get_data(nullable_column->data_column()); \
if (in_pred->is_use_array()) { \
for (size_t j = column_offset; j < data_array.size(); j++) { \
if (!nullable_column->is_null(j)) { \
in_pred->insert_array(data_array[j]); \
} else { \
if (_eq_null) { \
in_pred->insert_null(); \
} \
} \
} \
} else { \
for (size_t j = column_offset; j < data_array.size(); j++) { \
if (!nullable_column->is_null(j)) { \
in_pred->insert(data_array[j]); \
} else { \
if (_eq_null) { \
in_pred->insert_null(); \
} \
} \
} \
} \
break; \
}
APPLY_FOR_ALL_SCALAR_TYPE(M)
#undef M

View File

@ -894,7 +894,7 @@ private:
if (const_column->only_null()) {
_selection[0] = _has_null;
} else {
const auto& input_data = GetContainer<Type>().get_data(const_column->data_column());
const auto& input_data = GetContainer<Type>::get_data(const_column->data_column());
_evaluate_min_max(input_data, _selection, 1);
if constexpr (can_use_bf) {
_rf_test_data<multi_partition>(_selection, input_data, _hash_values, 0);
@ -904,7 +904,7 @@ private:
memset(_selection, sel, size);
} else if (input_column->is_nullable()) {
const auto* nullable_column = down_cast<const NullableColumn*>(input_column);
const auto& input_data = GetContainer<Type>().get_data(nullable_column->data_column());
const auto& input_data = GetContainer<Type>::get_data(nullable_column->data_column());
_evaluate_min_max(input_data, _selection, size);
if (nullable_column->has_null()) {
const uint8_t* null_data = nullable_column->immutable_null_column_data().data();
@ -925,7 +925,7 @@ private:
}
}
} else {
const auto& input_data = GetContainer<Type>().get_data(input_column);
const auto& input_data = GetContainer<Type>::get_data(input_column);
_evaluate_min_max(input_data, _selection, size);
if constexpr (can_use_bf) {
for (int i = 0; i < size; ++i) {

View File

@ -125,7 +125,7 @@ struct FilterIniter {
if (column->is_nullable()) {
auto* nullable_column = ColumnHelper::as_raw_column<NullableColumn>(column);
const auto& data_array = GetContainer<ltype>().get_data(nullable_column->data_column().get());
const auto& data_array = GetContainer<ltype>::get_data(nullable_column->data_column().get());
for (size_t j = column_offset; j < data_array.size(); j++) {
if (!nullable_column->is_null(j)) {
filter->insert(data_array[j]);
@ -136,7 +136,7 @@ struct FilterIniter {
}
}
} else {
const auto& data_array = GetContainer<ltype>().get_data(column.get());
const auto& data_array = GetContainer<ltype>::get_data(column.get());
for (size_t j = column_offset; j < data_array.size(); j++) {
filter->insert(data_array[j]);
}

View File

@ -2633,7 +2633,8 @@ StatusOr<ColumnPtr> StringFunctions::ascii(FunctionContext* context, const Colum
}
DEFINE_UNARY_FN_WITH_IMPL(get_charImpl, value) {
return std::string((char*)&value, 1);
char* p = (char*)&value;
return std::string(p, 1);
}
StatusOr<ColumnPtr> StringFunctions::get_char(FunctionContext* context, const Columns& columns) {

View File

@ -101,7 +101,7 @@ public:
result->resize(size);
auto* r3 = result->get_data().data();
const auto& data_array = GetContainer<Type>().get_data(v1);
const auto& data_array = GetContainer<Type>::get_data(v1);
if constexpr (lt_is_string<Type> || lt_is_binary<Type>) {
for (int i = 0; i < size; ++i) {
@ -136,7 +136,6 @@ public:
int size = v1->size();
for (int i = 0; i < size; ++i) {
std::string ret = OP::template apply<RunTimeCppType<Type>, std::string>(r1[i], std::forward<Args>(args)...);
bytes.reserve(ret.size());
bytes.insert(bytes.end(), (uint8_t*)ret.data(), (uint8_t*)ret.data() + ret.size());
offset.emplace_back(bytes.size());
}

View File

@ -80,6 +80,18 @@ check_prerequest() {
fi
}
# echo if gcc version is greater than 14.0.0
# else echo ""
echo_gt_gcc14() {
local version=$($CC -dumpfullversion | grep -oP '(?<=\s)\d+\.\d+\.\d+' | head -1)
if [[ $(echo -e "14.0.0\n$version" | sort -V | tail -1) == "14.0.0" ]]; then
echo ""
else
#gt gcc14
echo "$1"
fi
}
# sudo apt-get install cmake
# sudo yum install cmake
check_prerequest "${CMAKE_CMD} --version" "cmake"
@ -588,7 +600,7 @@ build_rocksdb() {
CFLAGS= \
EXTRA_CFLAGS="-I ${TP_INCLUDE_DIR} -I ${TP_INCLUDE_DIR}/snappy -I ${TP_INCLUDE_DIR}/lz4 -L${TP_LIB_DIR} ${FILE_PREFIX_MAP_OPTION}" \
EXTRA_CXXFLAGS="-fPIC -Wno-deprecated-copy -Wno-stringop-truncation -Wno-pessimizing-move -I ${TP_INCLUDE_DIR} -I ${TP_INCLUDE_DIR}/snappy ${FILE_PREFIX_MAP_OPTION}" \
EXTRA_CXXFLAGS=$(echo_opts_gcc14 -Wno-error=redundant-move)" -fPIC -Wno-deprecated-copy -Wno-stringop-truncation -Wno-pessimizing-move -I ${TP_INCLUDE_DIR} -I ${TP_INCLUDE_DIR}/snappy ${FILE_PREFIX_MAP_OPTION}" \
EXTRA_LDFLAGS="-static-libstdc++ -static-libgcc" \
PORTABLE=1 make USE_RTTI=1 -j$PARALLEL static_lib
@ -652,12 +664,18 @@ build_flatbuffers() {
mkdir -p $BUILD_DIR
cd $BUILD_DIR
rm -rf CMakeCache.txt CMakeFiles/
export CXXFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g " $(echo_opts_gcc14 "-Wno-error=stringop-overread")
export CPPFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g " $(echo_opts_gcc14 "-Wno-error=stringop-overread")
LDFLAGS="-static-libstdc++ -static-libgcc" \
${CMAKE_CMD} .. -G "${CMAKE_GENERATOR}" -DFLATBUFFERS_BUILD_TESTS=OFF
${BUILD_SYSTEM} -j$PARALLEL
cp flatc $TP_INSTALL_DIR/bin/flatc
cp -r ../include/flatbuffers $TP_INCLUDE_DIR/flatbuffers
cp libflatbuffers.a $TP_LIB_DIR/libflatbuffers.a
restore_compile_flags
}
build_brotli() {
@ -1097,10 +1115,14 @@ build_benchmark() {
mkdir -p $BUILD_DIR
cd $BUILD_DIR
rm -rf CMakeCache.txt CMakeFiles/
# https://github.com/google/benchmark/issues/773
cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=off \
-DBENCHMARK_ENABLE_GTEST_TESTS=off \
-DCMAKE_INSTALL_PREFIX=$TP_INSTALL_DIR \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DRUN_HAVE_STD_REGEX=0 \
-DRUN_HAVE_POSIX_REGEX=0 \
-DCOMPILE_HAVE_GNU_POSIX_REGEX=0 \
-DCMAKE_BUILD_TYPE=Release ../
${BUILD_SYSTEM} -j$PARALLEL
${BUILD_SYSTEM} install

View File

@ -298,6 +298,7 @@ echo "Finished patching $LZ4_SOURCE"
cd $TP_SOURCE_DIR/$ROCKSDB_SOURCE
if [ ! -f $PATCHED_MARK ] && [ $ROCKSDB_SOURCE == "rocksdb-6.22.1" ]; then
patch -p1 < $TP_PATCH_DIR/rocksdb-6.22.1-metadata-header.patch
patch -p1 < $TP_PATCH_DIR/rocksdb-6.22.1-gcc14.patch
touch $PATCHED_MARK
fi
cd -
@ -407,10 +408,14 @@ if [ ! -f $PATCHED_MARK ] && [ $MARIADB_SOURCE = "mariadb-connector-c-3.2.5" ];
patch -p0 < $TP_PATCH_DIR/mariadb-connector-c-3.2.5-for-starrocks-static-link.patch
touch $PATCHED_MARK
echo "Finished patching $MARIADB_SOURCE"
else
echo "$MARIADB_SOURCE not patched"
fi
if [ ! -f $PATCHED_MARK ] && [ $MARIADB_SOURCE = "mariadb-connector-c-3.1.4" ]; then
patch -p0 < $TP_PATCH_DIR/mariadb-connector-c-3.1.4-gcc14.patch
touch $PATCHED_MARK
echo "Finished patching $MARIADB_SOURCE"
fi
# patch aws-sdk-cpp
cd $TP_SOURCE_DIR/$AWS_SDK_CPP_SOURCE
if [ $AWS_SDK_CPP_SOURCE = "aws-sdk-cpp-1.11.267" ]; then
if [ ! -f prefetch_crt_dep_ok ]; then
@ -419,7 +424,6 @@ if [ $AWS_SDK_CPP_SOURCE = "aws-sdk-cpp-1.11.267" ]; then
fi
fi
# patch jemalloc_hook
cd $TP_SOURCE_DIR/$JEMALLOC_SOURCE
if [ ! -f $PATCHED_MARK ] && [ $JEMALLOC_SOURCE = "jemalloc-5.3.0" ]; then
@ -463,6 +467,7 @@ cd $TP_SOURCE_DIR/$AVRO_SOURCE/lang/c
if [ ! -f $PATCHED_MARK ] && [ $AVRO_SOURCE = "avro-release-1.10.2" ]; then
patch -p0 < $TP_PATCH_DIR/avro-1.10.2.c.patch
cp $TP_PATCH_DIR/avro-1.10.2.c.findjansson.patch $TP_SOURCE_DIR/$AVRO_SOURCE/lang/c/Findjansson.cmake
patch -p1 < $TP_PATCH_DIR/avro-1.10.2.c.gcc14.patch
touch $PATCHED_MARK
fi
cd -
@ -481,6 +486,7 @@ cd -
cd $TP_SOURCE_DIR/$SASL_SOURCE
if [ ! -f $PATCHED_MARK ] && [ $SASL_SOURCE = "cyrus-sasl-2.1.28" ]; then
patch -p1 < $TP_PATCH_DIR/sasl2-add-k5support-link.patch
patch -p1 < $TP_PATCH_DIR/sasl2-gcc14.patch
touch $PATCHED_MARK
fi
echo "Finished patching $SASL_SOURCE"
@ -538,3 +544,15 @@ if [[ -d $TP_SOURCE_DIR/$POCO_SOURCE ]] ; then
cd -
echo "Finished patching $POCO_SOURCE"
fi
# patch breakpad
if [[ -d $TP_SOURCE_DIR/$BREAK_PAD_SOURCE ]] ; then
cd $TP_SOURCE_DIR/$BREAK_PAD_SOURCE
if [ ! -f "$PATCHED_MARK" ] && [[ $BREAK_PAD_SOURCE == "breakpad-2022.07.02" ]] ; then
patch -p1 < "$TP_PATCH_DIR/breakpad-2022.07.02.patch"
touch "$PATCHED_MARK"
fi
cd -
echo "Finished patching $BREAK_PAD_SOURCE"
fi

View File

@ -0,0 +1,13 @@
diff --git a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c
index ff9e970..b26dad1 100644
--- a/lang/c/examples/quickstop.c
+++ b/lang/c/examples/quickstop.c
@@ -107,7 +107,7 @@ int print_person(avro_file_reader_t db, avro_schema_t reader_schema)
if (rval == 0) {
int64_t id;
int32_t age;
- int32_t *p;
+ const char *p;
size_t size;
avro_value_t id_value;
avro_value_t first_value;

View File

@ -0,0 +1,12 @@
diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h
index c7e4f2b..f30ce91 100644
--- a/src/client/linux/handler/minidump_descriptor.h
+++ b/src/client/linux/handler/minidump_descriptor.h
@@ -34,6 +34,7 @@
#include <sys/types.h>
#include <string>
+#include <cstdint>
#include "client/linux/handler/microdump_extra_info.h"
#include "common/using_std_string.h"

View File

@ -0,0 +1,13 @@
diff --git a/zlib/gzguts.h b/zlib/gzguts.h
index 990a4d2..d7e7476 100644
--- a/zlib/gzguts.h
+++ b/zlib/gzguts.h
@@ -3,6 +3,8 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
+
#ifdef _LARGEFILE64_SOURCE
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1

View File

@ -0,0 +1,151 @@
diff --git a/db/compaction/compaction_iteration_stats.h b/db/compaction/compaction_iteration_stats.h
index cb7b82c..a82cf95 100644
--- a/db/compaction/compaction_iteration_stats.h
+++ b/db/compaction/compaction_iteration_stats.h
@@ -6,6 +6,7 @@
#pragma once
#include "rocksdb/rocksdb_namespace.h"
+#include <cstdint>
struct CompactionIterationStats {
// Compaction statistics
diff --git a/db/kv_checksum.h b/db/kv_checksum.h
index ba15dca..5372f61 100644
--- a/db/kv_checksum.h
+++ b/db/kv_checksum.h
@@ -57,7 +57,7 @@ typedef ProtectionInfoKVOTS<uint64_t> ProtectionInfoKVOTS64;
template <typename T>
class ProtectionInfo {
public:
- ProtectionInfo<T>() = default;
+ ProtectionInfo() = default;
Status GetStatus() const;
ProtectionInfoKVOT<T> ProtectKVOT(const Slice& key, const Slice& value,
@@ -86,7 +86,7 @@ class ProtectionInfo {
static const uint64_t kSeedS = 0x4A2AB5CBD26F542C;
static const uint64_t kSeedC = 0x1CB5633EC70B2937;
- ProtectionInfo<T>(T val) : val_(val) {
+ ProtectionInfo(T val) : val_(val) {
static_assert(sizeof(ProtectionInfo<T>) == sizeof(T), "");
}
@@ -99,7 +99,7 @@ class ProtectionInfo {
template <typename T>
class ProtectionInfoKVOT {
public:
- ProtectionInfoKVOT<T>() = default;
+ ProtectionInfoKVOT() = default;
ProtectionInfo<T> StripKVOT(const Slice& key, const Slice& value,
ValueType op_type, const Slice& timestamp) const;
@@ -121,7 +121,7 @@ class ProtectionInfoKVOT {
friend class ProtectionInfoKVOTS<T>;
friend class ProtectionInfoKVOTC<T>;
- ProtectionInfoKVOT<T>(T val) : info_(val) {
+ ProtectionInfoKVOT(T val) : info_(val) {
static_assert(sizeof(ProtectionInfoKVOT<T>) == sizeof(T), "");
}
@@ -134,7 +134,7 @@ class ProtectionInfoKVOT {
template <typename T>
class ProtectionInfoKVOTC {
public:
- ProtectionInfoKVOTC<T>() = default;
+ ProtectionInfoKVOTC() = default;
ProtectionInfoKVOT<T> StripC(ColumnFamilyId column_family_id) const;
@@ -162,8 +162,8 @@ class ProtectionInfoKVOTC {
private:
friend class ProtectionInfoKVOT<T>;
- ProtectionInfoKVOTC<T>(T val) : kvot_(val) {
- static_assert(sizeof(ProtectionInfoKVOTC<T>) == sizeof(T), "");
+ ProtectionInfoKVOTC(T val) : kvot_(val) {
+ static_assert(sizeof(ProtectionInfoKVOTC) == sizeof(T), "");
}
T GetVal() const { return kvot_.GetVal(); }
@@ -175,7 +175,7 @@ class ProtectionInfoKVOTC {
template <typename T>
class ProtectionInfoKVOTS {
public:
- ProtectionInfoKVOTS<T>() = default;
+ ProtectionInfoKVOTS() = default;
ProtectionInfoKVOT<T> StripS(SequenceNumber sequence_number) const;
@@ -203,7 +203,7 @@ class ProtectionInfoKVOTS {
private:
friend class ProtectionInfoKVOT<T>;
- ProtectionInfoKVOTS<T>(T val) : kvot_(val) {
+ ProtectionInfoKVOTS(T val) : kvot_(val) {
static_assert(sizeof(ProtectionInfoKVOTS<T>) == sizeof(T), "");
}
diff --git a/include/rocksdb/utilities/checkpoint.h b/include/rocksdb/utilities/checkpoint.h
index df2a744..30e3d88 100644
--- a/include/rocksdb/utilities/checkpoint.h
+++ b/include/rocksdb/utilities/checkpoint.h
@@ -10,6 +10,7 @@
#include <string>
#include <vector>
+#include <cstdint>
#include "rocksdb/status.h"
namespace ROCKSDB_NAMESPACE {
diff --git a/table/block_based/data_block_hash_index.h b/table/block_based/data_block_hash_index.h
index f356395..6eaf717 100644
--- a/table/block_based/data_block_hash_index.h
+++ b/table/block_based/data_block_hash_index.h
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include <cstdint>
#include "rocksdb/slice.h"
diff --git a/third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h b/third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h
index 573330c..ada1e63 100644
--- a/third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h
+++ b/third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h
@@ -14,6 +14,7 @@
#include <mutex>
#include <stdexcept>
#include <utility>
+#include <system_error>
namespace folly {
namespace detail {
diff --git a/trace_replay/trace_replay.cc b/trace_replay/trace_replay.cc
index 5fd5295..8fd5bf3 100644
--- a/trace_replay/trace_replay.cc
+++ b/trace_replay/trace_replay.cc
@@ -217,7 +217,7 @@ void TracerHelper::DecodeMultiGetPayload(Trace* trace,
multiget_payload->cf_ids.reserve(multiget_payload->multiget_size);
multiget_payload->multiget_keys.reserve(multiget_payload->multiget_size);
for (uint32_t i = 0; i < multiget_payload->multiget_size; i++) {
- uint32_t tmp_cfid;
+ uint32_t tmp_cfid{};
Slice tmp_key;
GetFixed32(&cfids_payload, &tmp_cfid);
GetLengthPrefixedSlice(&keys_payload, &tmp_key);
diff --git a/util/string_util.h b/util/string_util.h
index 195ae8b..8af0180 100644
--- a/util/string_util.h
+++ b/util/string_util.h
@@ -10,6 +10,7 @@
#include <string>
#include <unordered_map>
#include <vector>
+#include <cstdint>
#include "rocksdb/rocksdb_namespace.h"

26
thirdparty/patches/sasl2-gcc14.patch vendored Normal file
View File

@ -0,0 +1,26 @@
diff --git a/lib/saslutil.c b/lib/saslutil.c
index 46c628c..5341cbb 100644
--- a/lib/saslutil.c
+++ b/lib/saslutil.c
@@ -59,9 +59,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef HAVE_TIME_H
#include <time.h>
-#endif
#include "saslint.h"
#include <saslutil.h>
diff --git a/plugins/cram.c b/plugins/cram.c
index d02e9ba..89c9308 100644
--- a/plugins/cram.c
+++ b/plugins/cram.c
@@ -52,6 +52,7 @@
#include <sys/stat.h>
#endif
#include <fcntl.h>
+#include <time.h>
#include <sasl.h>
#include <saslplug.h>