Skip to content

Commit aa0fa03

Browse files
Define _GNU_SOURCE so Linux wheels build under GCC 14
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 640f61a commit aa0fa03

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎setup.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ def run(self):
182182
building_for_openbsd = 'openbsd' in self.plat_name # need testing
183183

184184
if building_for_linux:
185+
# glibc/musl only declare memmem() when _GNU_SOURCE is set; GCC 14
186+
# treats the missing prototype as an error.
187+
module.define_macros.append(('_GNU_SOURCE', '1'))
185188
module.define_macros.append(('USE_LINUX_PROC', '1'))
186189
elif building_for_windows:
187190
module.define_macros.append(('USE_WINDOWS_PROC', '1'))

0 commit comments

Comments
 (0)