Skip to content

Commit cf98c6e

Browse files
committed
Fix annoying bug where clang build corrupts memory due to wrong alignments defines.
1 parent e553406 commit cf98c6e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

configure.ac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ AC_CHECK_FUNCS(sem_init)
10551055
if test "$ac_cv_func_sem_init" = "yes"; then
10561056
AC_MSG_CHECKING(for working sem_init())
10571057
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
1058-
main () {
1058+
int main () {
10591059
sem_t s;
10601060
return sem_init(&s,0,0);
10611061
}
@@ -1096,7 +1096,7 @@ AC_SYS_LARGEFILE
10961096
if test "$ac_cv_sys_file_offset_bits" = "no"; then
10971097
AC_MSG_CHECKING(for native large file support)
10981098
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <unistd.h>
1099-
main () {
1099+
int main () {
11001100
return !(sizeof(off_t) == 8);
11011101
}]])],[ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
11021102
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)],[])
@@ -1143,7 +1143,7 @@ dnl EKU: try to determine the alignment of long and double
11431143
dnl replaces FB_ALIGNMENT and FB_DOUBLE_ALIGN in src/jrd/common.h
11441144
AC_MSG_CHECKING(alignment of long)
11451145
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
1146-
main () {
1146+
int main () {
11471147
struct s {
11481148
char a;
11491149
union { long long x; sem_t y; } b;
@@ -1154,7 +1154,7 @@ AC_MSG_RESULT($ac_cv_c_alignment)
11541154
AC_DEFINE_UNQUOTED(FB_ALIGNMENT, $ac_cv_c_alignment, [Alignment of long])
11551155

11561156
AC_MSG_CHECKING(alignment of double)
1157-
AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
1157+
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main () {
11581158
struct s {
11591159
char a;
11601160
double b;

0 commit comments

Comments
 (0)