Bug 15763 - ldb fails to build with clang
Summary: ldb fails to build with clang
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.21.2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-07 12:58 UTC by Mohamed Akram
Modified: 2024-12-09 20:43 UTC (History)
1 user (show)

See Also:


Attachments
possible patch (951 bytes, patch)
2024-12-08 22:22 UTC, Douglas Bagnall
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed Akram 2024-12-07 12:58:33 UTC
I'm getting these errors when building on macOS:

  ../../lib/ldb/tests/test_ldb_comparison_fold.c:58:2: error: initializer element is not a compile-time constant
     58 |         STR_VAL("", 0),
        |         ^~~~~~~~~~~~~~

  ../../lib/ldb/tests/test_ldb_comparison_fold.c:80:2: error: initializer element is not a compile-time constant
     80 |         STR_VAL(" a", 1),
        |         ^~~~~~~~~~~~~~~~

  ../../lib/ldb/tests/test_ldb_comparison_fold.c:96:2: error: initializer element is not a compile-time constant
     96 |         STR_VAL(" a", 1),
        |         ^~~~~~~~~~~~~~~~
Comment 1 Douglas Bagnall 2024-12-08 22:22:04 UTC
Created attachment 18506 [details]
possible patch

Are you able to apply this patch? does it help?
Comment 2 Mohamed Akram 2024-12-09 20:43:47 UTC
Yup, that works, thanks.