Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,11 @@ AM_PROG_AS

AX_COMPILER_VENDOR

AC_MSG_CHECKING([for C compiler version])
# Capture the output of the compiler version command
ac_cv_c_compiler_version=`${CC} --version 2>&1 | grep "Apple clang version" | head -n 1 | awk '{print $4}' | cut -d'.' -f1`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hacky and only works for Apple Clang 17, but I don't think we will need to maintain it for a long time.

AC_MSG_RESULT([$ac_cv_c_compiler_version])

AX_CC_FOR_BUILD

CFLAGS="${_ts_saved_CFLAGS}"
Expand Down Expand Up @@ -848,6 +853,9 @@ AS_IF([test "x${has_optimizer_flags}" = "xno"],
]
)

AS_IF([test "x$ac_cv_c_compiler_version" = "x17"], [NO_WARN_CAST_FUNCTION_TYPE_MISMATCH="-Wno-cast-function-type-mismatch"], [NO_WARN_CAST_FUNCTION_TYPE_MISMATCH=""])
AC_SUBST([NO_WARN_CAST_FUNCTION_TYPE_MISMATCH])

case $host_os_def in
linux)
AS_IF([test "x$ax_cv_c_compiler_vendor" = "xintel"], [
Expand Down Expand Up @@ -885,7 +893,7 @@ case $host_os_def in

darwin)
AS_IF([test "x$ax_cv_c_compiler_vendor" = "xclang"], [
common_opt="-pipe -Wall -Wno-deprecated-declarations -Qunused-arguments -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter"
common_opt="-pipe -Wall -Wno-deprecated-declarations -Qunused-arguments -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-vla-extension $NO_WARN_CAST_FUNCTION_TYPE_MISMATCH"
debug_opt="-g $common_opt"
release_opt="-g $common_opt $optimizing_flags -fno-strict-aliasing"
cxx_opt="-Wno-invalid-offsetof"
Expand Down
2 changes: 2 additions & 0 deletions include/tscore/ink_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
#include "tscore/ink_config.h"

#ifdef HAVE_SYS_ENDIAN_H
#if !defined(darwin)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old versions of macOS didn't have be64toh and the other functions, but now those are defined on endian.h, and those cause errors due to duplication.

I could add a check for the availability of those functions, but this small change is enough. We don't have this issue on newer codebase.

#include <sys/endian.h>
#endif
#endif
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions iocore/net/QUICNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,6 @@ QUICNetVConnection::_packetize_frames(uint8_t *packet_buf, QUICEncryptionLevel l
max_frame_size = std::min(max_frame_size, this->_maximum_stream_frame_data_size());

bool probing = false;
int frame_count = 0;
size_t len = 0;
Ptr<IOBufferBlock> first_block = make_ptr<IOBufferBlock>(new_IOBufferBlock());
Ptr<IOBufferBlock> last_block = first_block;
Expand Down Expand Up @@ -1691,7 +1690,6 @@ QUICNetVConnection::_packetize_frames(uint8_t *packet_buf, QUICEncryptionLevel l
break;
}

++frame_count;
probing |= frame->is_probing_frame();
if (frame->is_flow_controlled()) {
int ret = this->_remote_flow_controller->update(this->_stream_manager->total_offset_sent());
Expand Down