[PATCH] Use private scols_cell_get_alignment() with older libsmartcols
authorMihai Moldovan <ionic@ionic.de>
Tue, 29 Sep 2020 16:30:16 +0000 (18:30 +0200)
committerLuca Boccassi <bluca@debian.org>
Mon, 26 Aug 2024 15:44:33 +0000 (16:44 +0100)
Stretch's version of libsmartcols includes the (binary) symbol, but does not
export it via its API, probably to make the intermediate release
API-compatible.

libdnf needs it, so we'll just declare the function and hope that linking will
be able to pick it up just fine.

For newer versions, that should just turn into a comment.

Gbp-Pq: Name 0009-Use-private-scols_cell_get_alignment-with-older-libs.patch

libdnf/utils/smartcols/Cell.hpp

index b90f0050ca4b4c3dfc8a1457f3f58467c8eb50d9..fc3c1d4ab4d015eeda7c053ad52dfd3603f3404e 100644 (file)
 #include <string>
 #include <stdexcept>
 
+extern "C" {
+@LIBSMARTCOLS_COMPAT@ extern int scols_cell_get_alignment(const struct libscols_cell *ce);
+}
+
 class Cell
 {
 public: