Skip to content

Commit

Permalink
Fix missing __APPLE_USE_RFC_3542 (#12753)
Browse files Browse the repository at this point in the history
* Fix missing __APPLE_USE_RFC_3542

#### Problem

In splitting `UDPEndPoint.cpp` by implementation, the definition
of `__APPLE_USE_RFC_3542` was lost, which caused `IPV6_PKTINFO`
to not be defined and corresponding parts of `UDPEndPoint` not to
be built.

#### Change overview

Add `#define __APPLE_USE_RFC_3542` to the top of
`UDPEndPointImplSockets.cpp`, as it had been in
`UDPEndPoint.cpp`.

#### Testing

CI

* Update src/inet/UDPEndPointImplSockets.cpp

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Fix trailing  whitespace

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Jan 25, 2022
1 parent b23c257 commit 7784997
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/inet/UDPEndPointImplSockets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
* This file implements Inet::UDPEndPoint using sockets.
*/

// Required to properly support underlying RFC3542-related fields to IPV6_PKTINFO
// on Darwin.
#define __APPLE_USE_RFC_3542
#include <inet/UDPEndPointImplSockets.h>

#include <lib/support/CodeUtils.h>
Expand Down

0 comments on commit 7784997

Please sign in to comment.