[MacPorts] #61954: umem: error: implicit declaration of function 'ec_atomic_cas' is invalid in C99

MacPorts noreply at macports.org
Thu Dec 31 21:45:42 UTC 2020


#61954: umem: error: implicit declaration of function 'ec_atomic_cas' is invalid in
C99
-------------------------+--------------------
  Reporter:  ryandesign  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.6.4
Resolution:              |   Keywords:  arm64
      Port:  umem        |
-------------------------+--------------------

Comment (by ryandesign):

 This patch may provide a possible solution:

 https://git.triangulation.nl/koenk/libumem-
 mvx/-/commit/da390045aa0c06d91b9b3224e831a488bcb0d274

 It avoids the need to define `ec_atomic_cas` and `ec_atomic_cas64` at all
 on macOS and instead defines `ec_atomic_inc` and `ec_atomic_inc64` in
 terms of the built-in macOS functions `OSAtomicIncrement32Barrier` and
 `OSAtomicIncrement64Barrier` respectively.

 The rest of the patch might not be needed since I believe it is for non-
 macOS systems.

 `OSAtomicIncrement32Barrier` and `OSAtomicIncrement64Barrier` are
 deprecated according to the OS header in which they're defined,
 <OSAtomicDeprecated.h>. It says standard C11 functions from <stdatomic.h>
 or standard C++11 functions from <atomic> should be used instead.

-- 
Ticket URL: <https://trac.macports.org/ticket/61954#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list