forked from rpm-software-management/librepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change header files to match a configured ABI regarding a zchunk support
If librepo was built with -DWITH_ZCHUNK=ON but an application included <librepo/librepo.h> without defining -DWITH_ZCHUNK, struct LrDownloadTarget mismatched. The same problem happened vice versa. Following the correct ABI was a burden for librepo applications and a mistake there could lead to a memory corruption. This patch replaces the WITH_ZCHUNK macros in the public header files with a constant so that the installed header files do not depend on the macro and always match the installed library. This patch also adds a missing RPM dependency on zchunk-devel to librepo-devel if built with enabled zchunk. (Some header files include <zck.h>.) An implementation note: CMakeLists.txt appends the header search paths with both a top-level build directory as well as with a librepo subdirectory. The latter is for "util.h" inclusions from the C files, the former is for <librepo/util.h> inclusions from other librepo header files. Without the former a C preprocesor would use already installed <librepo/util.h>. We do not want to infect the being built library with old and possible nonmatching system header files. Fixes: rpm-software-management#298
- Loading branch information
Showing
7 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters