twisted / twisted/twisted

Building sendmsg.so on AIX requires extra define

Open
#5,936 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core new priority-lowest
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

schlenk's avatar schlenk reported
Trac ID trac#5936
Type defect
Created 2012-09-03 12:33:46Z

When building the 12.2.0 release with GCC on AIX, the symbols
CMSG_SIZE and CMSG_LEN come up as undefined.

 twisted/python/sendmsg.c: In function 'sendmsg_sendmsg':
 twisted/python/sendmsg.c:243: warning: implicit declaration of function 'CMSG_SPACE'
 twisted/python/sendmsg.c:306: warning: implicit declaration of function 'CMSG_LEN'

Those symbols are only defined when _LINUX_SOURCE_COMPAT is defined on AIX.

Adding -D_LINUX_SOURCE_COMPAT to CFLAGS or in front of the sys/socket.h include fixes it.

Attachments:

  • sendmsg.c.aix.patch (475 bytes) - added by schlenk on 2012-09-03 12:44:38Z - Patch to add _LINUX_SOURCE_COMPAT
Searchable metadata
trac-id__5936 5936
type__defect defect
reporter__schlenk schlenk
priority__lowest lowest
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__aix aix
time__1346675626000000 1346675626000000
changetime__1355741539000000 1355741539000000
version__None None
owner__schlenk schlenk

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with twisted/python/sendmsg.c and inspect the sys/socket.h include and the sendmsg_sendmsg references to CMSG_SPACE and CMSG_LEN. Build the sendmsg extension with GCC on AIX and confirm those symbols are declared without compiler warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.