Skip to content

Commit c04bb65

Browse files
committed
liboqs: Set MLK_CONFIG_EXTERNAL_API_QUALIFIER in liboqs integration configs
The liboqs integration configs were missing MLK_CONFIG_EXTERNAL_API_QUALIFIER which should be set to OQS_API. This is causing some issues as reported in open-quantum-safe/liboqs#2376. This commit adds them to align with mldsa-native. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
1 parent 22a3bb0 commit c04bb65

3 files changed

Lines changed: 53 additions & 0 deletions

File tree

integration/liboqs/config_aarch64.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@
2525
#endif
2626
#endif /* !__ASSEMBLER__ */
2727

28+
/******************************************************************************
29+
* Name: MLK_CONFIG_EXTERNAL_API_QUALIFIER
30+
*
31+
* Description: If set, this option provides an additional function
32+
* qualifier to be added to declarations of mlkem-native's
33+
* public API.
34+
*
35+
* The primary use case for this option are single-CU builds
36+
* where the public API exposed by mlkem-native is wrapped by
37+
* another API in the consuming application. In this case,
38+
* even mlkem-native's public API can be marked `static`.
39+
*
40+
*****************************************************************************/
41+
#if !defined(__ASSEMBLER__)
42+
#include <oqs/common.h>
43+
#define MLK_CONFIG_EXTERNAL_API_QUALIFIER OQS_API
44+
#endif
45+
2846
/******************************************************************************
2947
* Name: MLK_CONFIG_PARAMETER_SET
3048
*

integration/liboqs/config_c.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@
2525
#endif
2626
#endif /* !__ASSEMBLER__ */
2727

28+
/******************************************************************************
29+
* Name: MLK_CONFIG_EXTERNAL_API_QUALIFIER
30+
*
31+
* Description: If set, this option provides an additional function
32+
* qualifier to be added to declarations of mlkem-native's
33+
* public API.
34+
*
35+
* The primary use case for this option are single-CU builds
36+
* where the public API exposed by mlkem-native is wrapped by
37+
* another API in the consuming application. In this case,
38+
* even mlkem-native's public API can be marked `static`.
39+
*
40+
*****************************************************************************/
41+
#if !defined(__ASSEMBLER__)
42+
#include <oqs/common.h>
43+
#define MLK_CONFIG_EXTERNAL_API_QUALIFIER OQS_API
44+
#endif
2845

2946
/******************************************************************************
3047
* Name: MLK_CONFIG_PARAMETER_SET

integration/liboqs/config_x86_64.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@
2525
#endif
2626
#endif /* !__ASSEMBLER__ */
2727

28+
/******************************************************************************
29+
* Name: MLK_CONFIG_EXTERNAL_API_QUALIFIER
30+
*
31+
* Description: If set, this option provides an additional function
32+
* qualifier to be added to declarations of mlkem-native's
33+
* public API.
34+
*
35+
* The primary use case for this option are single-CU builds
36+
* where the public API exposed by mlkem-native is wrapped by
37+
* another API in the consuming application. In this case,
38+
* even mlkem-native's public API can be marked `static`.
39+
*
40+
*****************************************************************************/
41+
#if !defined(__ASSEMBLER__)
42+
#include <oqs/common.h>
43+
#define MLK_CONFIG_EXTERNAL_API_QUALIFIER OQS_API
44+
#endif
45+
2846
/******************************************************************************
2947
* Name: MLK_CONFIG_PARAMETER_SET
3048
*

0 commit comments

Comments
 (0)