Skip to content

Commit c2be549

Browse files
authored
fix GCC15 compile error (#18737)
* fix GCC15 compile error
1 parent 8d1ccdb commit c2be549

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

src/common/colorspaces.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of darktable,
3-
Copyright (C) 2010-2024 darktable developers.
3+
Copyright (C) 2010-2025 darktable developers.
44
55
darktable is free software: you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,8 @@
2222

2323
#include <lcms2.h>
2424

25+
G_BEGIN_DECLS
26+
2527
// this was removed from lcms2 in 2.4
2628
#ifndef TYPE_XYZA_FLT
2729
#define TYPE_XYZA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
@@ -419,6 +421,8 @@ void dt_make_transposed_matrices_from_primaries_and_whitepoint(const float prima
419421
const float whitepoint[2],
420422
dt_colormatrix_t RGB_to_XYZ_transposed);
421423

424+
G_END_DECLS
425+
422426
// clang-format off
423427
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
424428
// vim: shiftwidth=2 expandtab tabstop=2 cindent

src/imageio/format/imageio_format_api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of darktable,
3-
Copyright (C) 2016-2021 darktable developers.
3+
Copyright (C) 2016-2025 darktable developers.
44
55
darktable is free software: you can redistribute it and/or modify
66
it under the terms of the GNU Lesser General Public License as published by
@@ -20,8 +20,6 @@
2020

2121
#ifdef FULL_API_H
2222

23-
G_BEGIN_DECLS
24-
2523
#include <stddef.h>
2624
#include <stdint.h>
2725

@@ -31,6 +29,8 @@ struct dt_dev_pixelpipe_t;
3129

3230
#include "common/colorspaces.h" // because forward declaring enums doesn't work in C++ :(
3331

32+
G_BEGIN_DECLS
33+
3434
/* early definition of modules to do type checking */
3535

3636
#pragma GCC visibility push(default)

src/lua/lua.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of darktable,
3-
Copyright (C) 2013-2024 darktable developers.
3+
Copyright (C) 2013-2025 darktable developers.
44
55
darktable is free software: you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -28,6 +28,11 @@
2828
#include <glib.h>
2929

3030
#ifdef USE_LUA
31+
32+
// while it's poor practice to have includes inside an "extern C" block, we need to
33+
// do this here because the Lua headers don't supply it when compiling under C++....
34+
G_BEGIN_DECLS
35+
3136
#include <lautoc.h>
3237
#include <lauxlib.h>
3338
#include <lua.h>
@@ -97,6 +102,8 @@ typedef struct
97102
} dt_lua_state_t;
98103
#endif
99104

105+
G_END_DECLS
106+
100107
// clang-format off
101108
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
102109
// vim: shiftwidth=2 expandtab tabstop=2 cindent

0 commit comments

Comments
 (0)