diff -Nru pgfincore-1.2.1/ChangeLog pgfincore-1.2.2/ChangeLog --- pgfincore-1.2.1/ChangeLog 2017-09-22 08:00:25.000000000 +0000 +++ pgfincore-1.2.2/ChangeLog 2019-10-29 13:58:26.000000000 +0000 @@ -1,3 +1,6 @@ +2019-10-29 Cédric Villemain + * 1.2.2 - Fix bad errno usage + 22/09/2017 Cédric Villemain * 1.2.1 - Fix check on NULL input for drawer function diff -Nru pgfincore-1.2.1/debian/changelog pgfincore-1.2.2/debian/changelog --- pgfincore-1.2.1/debian/changelog 2018-10-12 11:33:10.000000000 +0000 +++ pgfincore-1.2.2/debian/changelog 2019-10-29 13:57:19.000000000 +0000 @@ -1,3 +1,9 @@ +pgfincore (1.2.2-1) unstable; urgency=medium + + * Upload for PostgreSQL 12. + + -- Christoph Berg Tue, 29 Oct 2019 14:57:19 +0100 + pgfincore (1.2.1-2) unstable; urgency=medium * Upload for PostgreSQL 11. diff -Nru pgfincore-1.2.1/debian/control pgfincore-1.2.2/debian/control --- pgfincore-1.2.1/debian/control 2018-10-12 11:33:10.000000000 +0000 +++ pgfincore-1.2.2/debian/control 2019-10-29 13:57:19.000000000 +0000 @@ -4,17 +4,16 @@ Maintainer: Debian PostgreSQL Maintainers Uploaders: Cédric Villemain , Dimitri Fontaine , Christoph Berg Build-Depends: debhelper (>= 9), postgresql-server-dev-all (>= 158~) -Standards-Version: 4.2.0 +Standards-Version: 4.4.0 Vcs-Git: git://git.postgresql.org/git/pgfincore.git Vcs-Browser: http://git.postgresql.org/gitweb/?p=pgfincore.git Homepage: http://villemain.org/projects/pgfincore -Package: postgresql-11-pgfincore +Package: postgresql-12-pgfincore Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-11 +Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-12 Description: set of PostgreSQL functions to manage blocks in memory Those functions let you know which and how many disk block from a relation are in the page cache of the operating system, and eventually write the result to a file. Then using this file, it is possible to restore the page cache state for each block of the relation. - diff -Nru pgfincore-1.2.1/debian/control.in pgfincore-1.2.2/debian/control.in --- pgfincore-1.2.1/debian/control.in 2018-10-12 11:33:10.000000000 +0000 +++ pgfincore-1.2.2/debian/control.in 2019-10-29 13:57:19.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Debian PostgreSQL Maintainers Uploaders: Cédric Villemain , Dimitri Fontaine , Christoph Berg Build-Depends: debhelper (>= 9), postgresql-server-dev-all (>= 158~) -Standards-Version: 4.2.0 +Standards-Version: 4.4.0 Vcs-Git: git://git.postgresql.org/git/pgfincore.git Vcs-Browser: http://git.postgresql.org/gitweb/?p=pgfincore.git Homepage: http://villemain.org/projects/pgfincore diff -Nru pgfincore-1.2.1/pgfincore.c pgfincore-1.2.2/pgfincore.c --- pgfincore-1.2.1/pgfincore.c 2017-09-22 08:00:25.000000000 +0000 +++ pgfincore-1.2.2/pgfincore.c 2019-10-29 13:58:26.000000000 +0000 @@ -815,9 +815,10 @@ pa = mmap(NULL, st.st_size, PROT_NONE, MAP_SHARED, fd, 0); if (pa == MAP_FAILED) { + int save_errno = errno; FreeFile(fp); elog(ERROR, "Can not mmap object file : %s, errno = %i,%s\nThis error can happen if there is not enought space in memory to do the projection. Please mail cedric@villemain.org with '[pgfincore] ENOMEM' as subject.", - filename, errno, strerror(errno)); + filename, save_errno, strerror(save_errno)); return 3; } #endif @@ -839,15 +840,17 @@ /* Affect vec with mincore */ if (mincore(pa, st.st_size, vec) != 0) { + int save_errno = errno; munmap(pa, st.st_size); elog(ERROR, "mincore(%p, %lld, %p): %s\n", - pa, (long long int)st.st_size, vec, strerror(errno)); + pa, (long long int)st.st_size, vec, strerror(save_errno)); #else /* Affect vec with fincore */ if (fincore(fd, 0, st.st_size, vec) != 0) { + int save_errno = errno; elog(ERROR, "fincore(%u, 0, %lld, %p): %s\n", - fd, (long long int)st.st_size, vec, strerror(errno)); + fd, (long long int)st.st_size, vec, strerror(save_errno)); #endif free(vec); FreeFile(fp);