Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresql: Fix missing include #1146

Merged
merged 1 commit into from
Apr 29, 2024
Merged

postgresql: Fix missing include #1146

merged 1 commit into from
Apr 29, 2024

Conversation

h3xx
Copy link
Contributor

@h3xx h3xx commented Apr 29, 2024

Fixes FTBFS seen when using GCC 13.2.0.

It was complaining about not seeing std::int32_t and this include fixes it.

Compiling version ce0630b on Linux x86_64.

CMake options used:

mkdir _build; cd _build; cmake
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_INSTALL_MANDIR='man' \
    -DCMAKE_INSTALL_INFODIR='info' \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_EXE_LINKER_FLAGS='-s' \
    -DCMAKE_GENERATOR='Unix Makefiles' \
    -DCMAKE_VERBOSE_MAKEFILE=OFF \
    -DCMAKE_COLOR_MAKEFILE=ON \
    -DCMAKE_BUILD_TYPE='Release' \
    -DSOCI_TESTS=OFF \
    -DSOCI_STATIC=OFF \
    -DWITH_FIREBIRD=OFF \
    -DWITH_MYSQL=OFF \
    -DWITH_ORACLE=OFF \
    -DWITH_DB2=OFF \
    -DSOCI_CXX11=ON \
    ..
Full error message follows (~41 lines):
/tmp/git/soci/src/backends/postgresql/blob.cpp: In member function 'virtual std::size_t soci::postgresql_blob_backend::read_from_start(void*, std::size_t, std::size_t)':
/tmp/git/soci/src/backends/postgresql/blob.cpp:77:60: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
   77 |     const std::size_t batchSize = std::numeric_limits<std::int32_t>::max();
      |                                                            ^~~~~~~
In file included from /usr/include/sys/types.h:155,
                 from /usr/include/stdlib.h:514,
                 from /usr/include/c++/13.2.0/cstdlib:79,
                 from /usr/include/c++/13.2.0/ext/string_conversions.h:43,
                 from /usr/include/c++/13.2.0/bits/basic_string.h:4097,
                 from /usr/include/c++/13.2.0/string:54,
                 from /tmp/git/soci/include/soci/soci-platform.h:18,
                 from /tmp/git/soci/include/soci/postgresql/soci-postgresql.h:12,
                 from /tmp/git/soci/src/backends/postgresql/blob.cpp:9:
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
/tmp/git/soci/src/backends/postgresql/blob.cpp:77:60: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
   77 |     const std::size_t batchSize = std::numeric_limits<std::int32_t>::max();
      |                                                            ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
/tmp/git/soci/src/backends/postgresql/blob.cpp:77:67: error: template argument 1 is invalid
   77 |     const std::size_t batchSize = std::numeric_limits<std::int32_t>::max();
      |                                                                   ^
/tmp/git/soci/src/backends/postgresql/blob.cpp: In member function 'virtual std::size_t soci::postgresql_blob_backend::write_from_start(const void*, std::size_t, std::size_t)':
/tmp/git/soci/src/backends/postgresql/blob.cpp:115:60: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  115 |     const std::size_t batchSize = std::numeric_limits<std::int32_t>::max();
      |                                                            ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
/tmp/git/soci/src/backends/postgresql/blob.cpp:115:60: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  115 |     const std::size_t batchSize = std::numeric_limits<std::int32_t>::max();
      |                                                            ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
/tmp/git/soci/src/backends/postgresql/blob.cpp:115:67: error: template argument 1 is invalid
  115 |     const std::size_t batchSize = std::numeric_limits<std::int32_t>::max();
      |                                                                   ^

Fixes FTBFS seen when using GCC 13.2.0.
@vadz vadz merged commit 884808c into SOCI:master Apr 29, 2024
15 of 16 checks passed
@vadz
Copy link
Member

vadz commented Apr 29, 2024

Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants