Skip to content

gcc Make error (potential unaligned pointer value) #11

Open
@naeemk

Description

@naeemk

While this has somewhat been addressed here, is turning off Werror the only option to get around this?

libtool: compile: gcc -DPACKAGE_NAME=\"libusrsctp\" -DPACKAGE_TARNAME=\"libusrsctp\" -DPACKAGE_VERSION=\"0.9.3.0\" "-DPACKAGE_STRING=\"libusrsctp 0.9.3.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libusrsctp\" -DVERSION=\"0.9.3.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSCTP_DEBUG=1 -DINET=1 -DINET6=1 -DHAVE_SOCKET=1 -DHAVE_INET_ADDR=1 -DHAVE_STDATOMIC_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_NETINET_IP_ICMP_H=1 -DHAVE_SA_LEN=1 -DHAVE_SIN_LEN=1 -DHAVE_SIN6_LEN=1 -DHAVE_SCONN_LEN=1 -I. -DSCTP_PROCESS_LEVEL_LOCKS -DSCTP_SIMPLE_ALLOCATOR -D__Userspace__ -U__APPLE__ -D__Userspace_os_Darwin -g -O2 -std=c99 -Wno-deprecated-declarations -D__APPLE_USE_RFC_2292 -pedantic -Wall -Werror -g -O0 -MT netinet/libusrsctp_la-sctp_input.lo -MD -MP -MF netinet/.deps/libusrsctp_la-sctp_input.Tpo -c netinet/sctp_input.c -fno-common -DPIC -o netinet/.libs/libusrsctp_la-sctp_input.o netinet/sctp_input.c:1737:15: error: taking address of packed member 'time_entered' of class or structure 'sctp_state_cookie' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]

                                                          `&cookie->time_entered,
                                                           ^~~~~~~~~~~~~~~~~~~~`

netinet/sctp_input.c:2489:10: error: taking address of packed member 'time_entered' of class or structure 'sctp_state_cookie' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]

                                              `&cookie->time_entered, sctp_align_unsafe_makecopy,
                                               ^~~~~~~~~~~~~~~~~~~~`

2 errors generated. make[1]: *** [netinet/libusrsctp_la-sctp_input.lo] Error 1 make: *** [all-recursive] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions