From b435e036d9775b71048373b91d4c7c3398826858 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 16 Feb 2023 02:03:12 +0000 Subject: gentoo auto-resync : 16:02:2023 - 02:03:12 --- app-antivirus/Manifest.gz | Bin 883 -> 886 bytes app-antivirus/clamav/Manifest | 3 + app-antivirus/clamav/clamav-0.103.8.ebuild | 240 +++++++++++++++++++++ .../clamav/files/clamav-0.103.8-c-std.patch | 204 ++++++++++++++++++ 4 files changed, 447 insertions(+) create mode 100644 app-antivirus/clamav/clamav-0.103.8.ebuild create mode 100644 app-antivirus/clamav/files/clamav-0.103.8-c-std.patch (limited to 'app-antivirus') diff --git a/app-antivirus/Manifest.gz b/app-antivirus/Manifest.gz index 003b95e0a0aa..7ccbf4a84727 100644 Binary files a/app-antivirus/Manifest.gz and b/app-antivirus/Manifest.gz differ diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index 96d25b26f544..45f730e6fca8 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -2,6 +2,7 @@ AUX clamav-0.102.1-libxml2_pkgconfig.patch 4012 BLAKE2B 4c3e4fc3522d317c57bae942 AUX clamav-0.102.2-fix-curl-detection.patch 844 BLAKE2B a813b1f6003b9cff03fca8d72dbd44d6a4f700e3d60aee83f782a87893a3c6753698ca8715237155185660301dd81dc55bf6a6e3b9095f57b099607182c90bf5 SHA512 27e6aa5ad418eaa32b56ea7bbdab0b5b4cd649e55d34eb094b5f02d7e68d8913f39664ffd6bc4a07faf88f60bdbd15b0c381fbbd6d9c1c62cc36e72e34cabd19 AUX clamav-0.103.0-system-tomsfastmath.patch 3725 BLAKE2B 85640ded83600adfdcc03e8f42e3153c71a8b6c5884ca4cbd79a69121943fd171bc528aed26ded895189293008924cef6762a22001b4ee098fe5f680c7619bf0 SHA512 b67df39bc7d60f6ea9bb06d12413f0e4774185d4f020a68bdfdf8fe1ca669f70a62699b0f1100702af5ec47e460a35625dcaa09cfc6ea6d2f3957de227e87306 AUX clamav-0.103.1-upstream-openrc.patch 18249 BLAKE2B 305db3181a4a22acde5b28cef6c2d01b639be8c5b9e9c77737be1ebcb0553040b6eda117285e3e8b4bf06d2565a5d73225d7ce20ba1f115fd08bc822d779b370 SHA512 89e95057ee2f29bcdf5787f659ffe43b055b599d9bb80bf54794859113d760dad135b5b8d80c23e98f8c6b699dc839d4922c4c3b45edf97296f4eea668e62672 +AUX clamav-0.103.8-c-std.patch 8067 BLAKE2B a947309c705ed7812e907ababf8533485bf21a5a823aefbf942369e5c0297a46c4c03ebdb0b1c2b7569aa356ac802c3ef7a2b00f87eebbeefa6725a96e17113b SHA512 5b40b1307e8f6cf15bb5aff94ffd709d00e6d5e98ae6a0c31502968d3009b6f0cad9652fc5425525992cd25924f94c64022d8c8e1fb6dcf3f7724d458c53c376 AUX clamav-1.0.0-select-python.patch 1648 BLAKE2B d43eef80ad607a6cba9cc9f5fe01e1372e5a59b8e9ff55132bc931c021a8ed959fe9170ee93012f726c3d53223aaac745fa35ef69c06d049513f274b25bcf3e5 SHA512 525d471aba58796a92cc3304d2efc37644b0358f1c51fa26619e70c4e4f30e82af1935313491aad39aa24cf6af15f4c606f2914fc0eb8f254f88d503980121cd AUX clamav-milter.README.gentoo 2284 BLAKE2B 7afc18f3dad57c2d7595257b356943efb3d1af28d55ac8f09f0506430fd0dedf0820906ced666a7237e3af44a9bc1b43fff017c03faad844f96b132ca4c5dde6 SHA512 38eadf2d919a0c48345600ea5a39c90e766b62e8b1ffc7bb01969a8fd93c4545f2030058a470ac7efb75a1d6c74f9930438f58aeff5035e19e38241ed381f7b3 AUX clamav-milter.initd 1164 BLAKE2B 190dee3476f8763dc2498e2099e6afa83c36642298618ad959940771e73c07456e30e6319d649291c82fec49e3712e500a65b167fe91b12bd2758f79f040e1c3 SHA512 d21c60e7d3ee5eee65da18831eed905858a1c7ab4ec02de1c16fa36179d9c1cf517eca8402b872f3d995fa1d59a9b2e79994655ca4570370b40dc810af5e0a3d @@ -34,6 +35,7 @@ DIST cbindgen-0.20.0.crate 183277 BLAKE2B 51529b21879e3a3212fbb951b3bdd5c8c396dc DIST cexpr-0.6.0.crate 17966 BLAKE2B cb46f066eb1f4dbac00ec86dc3e562db7ee8ea5ff17d16a60004fa020405e455b8aeb3d001f669cb33d1b62525bfd04ec657ffca4ed44a83af4a5e75b2c820e3 SHA512 766bff7ca7f9bf0885aee6f014bcfc084e7fdfcd567a49443d5340acfe8f257db109de17b24588504fc35c53f2d4303e2d22da21f73669125cfca984950cf886 DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff DIST clamav-0.103.7.tar.gz 16501741 BLAKE2B 49fc1c8c42ee8168dbaec4aa13ab0dfef7fa285e335cb38b17bc020df7400ee1daae49e06ba5b4ae0364d47d707cb83c0b1a8442d5b01d2bba5827606fe27fb4 SHA512 d426169889d94411b20a2c9c9579fc22a15090c9847849822c63fc6b404075feba0ff3663ee1382b2af5300394c7a93669844736f7473bfdce3250e1fd130326 +DIST clamav-0.103.8.tar.gz 16524716 BLAKE2B 207a6087de9134586215a4f3fe02cb071135c38fac792f6cb2d4c4a3c9e596bff5dd0a0ac3dd9f6018771d866fa9e64223933f96cec3ee6e8ce17a743c3d952f SHA512 8e030fef5788cf4df8f4d878363df1e5d9abcaa209b9f998f57334ede481d755b33958b5e9bb82be9643cb7442814711e4c9978314cadd7eb9161fee03b74439 DIST clamav-1.0.0.tar.gz 10311477 BLAKE2B 8d66c03e7717ed52cb90a139f565abe2ed3379e09d500530c260f129f1f8eb2549dca11898f6c1a85e7988ce06388c8967e6decea06c840220ffccb4010add60 SHA512 a1be526516e622fd3359461db7dd8eb0734f7ba8ecb0b63c1574e216885cd7bcdc69ffdbc5e507a0060d23769e3caa8423aa273ec57bb86e40049679a818152a DIST clang-sys-1.4.0.crate 38679 BLAKE2B d15bdae2142ed26b4f6bd037bd2062e8c4b7b87fc5b749b872a95ff1952d000066c255aa0984e5f9c4a5c88066db4a20cfd048db4ba5a59b331d5ffa5e9a281d SHA512 062189bb0a341e2e85de4987f4b564c1fc69e4005c9c42cfedb61dee5f48db9126a8114d1d97be1b9c21b8c885243751232fbe8cf532e1d2be593308fe45216a DIST clap-2.34.0.crate 202210 BLAKE2B f383adf1d757ac4b68995132b33837686ce451f85a02a8d05d2c746da398510d05d46330f3efade063c3952aacb1754cdac73dd0afcae0df5340a89f9353aa1c SHA512 c648a761b9996a7e7464a538bb53621bae22090b846a42c3b729beca3363958ae67e3da9f93f58b10a10e043cadf7ff930388680d168646178c2824177832db8 @@ -147,5 +149,6 @@ DIST winapi-i686-pc-windows-gnu-0.4.0.crate 2918815 BLAKE2B 4d357e4d30f955297217 DIST winapi-util-0.1.5.crate 10164 BLAKE2B fc800aceae5249a858c806c3e969ef2545766099872d856ebee51c883d9acf1122278db9607d50ca53eac351502b700fd2463900932d342240f97f683d517963 SHA512 7baeb661f397c4693dfa001fdc774b323c51a7c55caad40f2de5112a1cefd1d6151e3df41fa4ee193460a5905917c83d2b1de5fa10b4bd014ad96690af95c0fd DIST winapi-x86_64-pc-windows-gnu-0.4.0.crate 2947998 BLAKE2B 2ad1ea8b5fa07d544e910ccba043ae925269b76b26c9da356305b34b86741dd8b9aff0b9ffe3d562db4fcd7d7c46a11ce9e3168b782b1d89ae6881742b7ede82 SHA512 4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513 EBUILD clamav-0.103.7-r1.ebuild 7330 BLAKE2B e220452a629bc06c8f7fe89b5b7a22e116feefdc960322b768dff0ef8344d739cb7035008953dfc3ba78f9453860bd58af637093aa7b6c525602be36116ba475 SHA512 06f5c7648ab57e3a4b78241ee801d85b4fd5f9aa8a513d95ea352cbef2defe6bc3c291b52961fd7ab15a2dd5823cd1b8ea561b0d942ea1d9607931533b6729c0 +EBUILD clamav-0.103.8.ebuild 7385 BLAKE2B 5c8a2f4380fe47d31e96b70a12e5600bb88a54827e5c4b697b3597827e4f9bb6af36108d26bf52b557a81f3cc95c16b8d550673479eb5b7de2ee55e2f5e8e251 SHA512 71ceaeb98712fcdc3ed5a832e6b7222fe10f5f88b4e0cc9afe226efeaea872860115cfc40fae8311cca9207f6ecdf58aceef2f4736b0683de86451bf6e0afd6e EBUILD clamav-1.0.0.ebuild 10083 BLAKE2B 28dcddb157dafb73dc8e01793c6adc9383a96330c1777ebe73c7adb63adc8c7df90e4e7cb41acad80f50a04a0e14b4ee5762516f4cca02ef80898d4348a253dc SHA512 9cd83da6a4b2b89fc29eed6d8ce1ab24772fca7db7279d6225405838541e0b4f2407da91a0158562bdb636b4c8b679a32206330e08dfe172fa995e756998e920 MISC metadata.xml 1409 BLAKE2B 4edc66e7c2fe4944edfd30ea266dab1dc5ca48b7b8a89608b46eb990576508433394d82df3134cb37f1a9d8c8a66f1612ff57ce7317da965d9e05b27dc195c33 SHA512 44b24ca469474232649da9d6b586b96b5c5c743ac925646691fb3b1cd736000f397365c1693fbe95103ee6940a5e31ffba64c3fbf15ec71e442b7d0108c9030a diff --git a/app-antivirus/clamav/clamav-0.103.8.ebuild b/app-antivirus/clamav/clamav-0.103.8.ebuild new file mode 100644 index 000000000000..56035dbcf6c4 --- /dev/null +++ b/app-antivirus/clamav/clamav-0.103.8.ebuild @@ -0,0 +1,240 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic systemd tmpfiles + +DESCRIPTION="Clam Anti-Virus Scanner" +HOMEPAGE="https://www.clamav.net/" +SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="bzip2 doc clamonacc clamdtop clamsubmit iconv ipv6 libclamav-only milter metadata-analysis-api selinux systemd test xml" + +REQUIRED_USE="libclamav-only? ( !clamonacc !clamdtop !clamsubmit !milter !metadata-analysis-api )" + +RESTRICT="!test? ( test )" + +# Require acct-{user,group}/clamav at build time so that we can set +# the permissions on /var/lib/clamav in src_install rather than in +# pkg_postinst; calling "chown" on the live filesystem scares me. +CDEPEND="acct-group/clamav + acct-user/clamav + dev-libs/libltdl + dev-libs/libmspack + || ( dev-libs/libpcre2 >dev-libs/libpcre-6 ) + dev-libs/tomsfastmath + >=sys-libs/zlib-1.2.2:= + bzip2? ( app-arch/bzip2 ) + clamdtop? ( sys-libs/ncurses:0 ) + clamsubmit? ( net-misc/curl dev-libs/json-c:= ) + elibc_musl? ( sys-libs/fts-standalone ) + iconv? ( virtual/libiconv ) + !libclamav-only? ( net-misc/curl ) + dev-libs/openssl:0= + milter? ( mail-filter/libmilter:= ) + xml? ( dev-libs/libxml2 )" + +# We need at least autoconf-2.69-r5 because that's the first (patched) +# version of it in Gentoo that supports ./configure --runstatedir. +BDEPEND=">=sys-devel/autoconf-2.69-r5 + virtual/pkgconfig" + +DEPEND="${CDEPEND} + metadata-analysis-api? ( dev-libs/json-c:* ) + test? ( dev-libs/check )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-clamav )" + +PATCHES=( + "${FILESDIR}/${PN}-0.102.1-libxml2_pkgconfig.patch" #661328 + "${FILESDIR}/${PN}-0.102.2-fix-curl-detection.patch" #709616 + "${FILESDIR}/${PN}-0.103.0-system-tomsfastmath.patch" # 649394 + "${FILESDIR}/${PN}-0.103.1-upstream-openrc.patch" + "${FILESDIR}/${PN}-0.103.8-c-std.patch" #879625 +) + +src_prepare() { + default + + # Be extra sure that we're using the system copy of tomsfastmath + einfo "removing bundled copy of dev-libs/tomsfastmath" + rm -r libclamav/tomsfastmath || \ + die "failed to remove bundled tomsfastmath" + + AT_NO_RECURSIVE="yes" eautoreconf +} + +src_configure() { + use elibc_musl && append-ldflags -lfts + use ppc64 && append-flags -mminimal-toc + + # according to configure help it should be + # $(use_enable xml) + # but that does not work + # do not add this, since --disable-xml seems to override + # --without-xml + JSONUSE="--without-libjson" + + if use clamsubmit || use metadata-analysis-api; then + # either of those 2 requires libjson. + # clamsubmit will be built as soon as libjson and curl are found + # but we only install the binary if requested + JSONUSE="--with-libjson=${EPREFIX}/usr" + fi + + local myeconfargs=( + $(use_enable bzip2) + $(use_enable clamonacc) + $(use_enable clamdtop) + $(use_enable ipv6) + $(use_enable milter) + $(use_enable test check) + $(use_with xml) + $(use_with iconv) + ${JSONUSE} + $(use_enable libclamav-only) + $(use_with !libclamav-only libcurl) + --with-system-libmspack + --cache-file="${S}"/config.cache + --disable-experimental + --disable-static + --disable-zlib-vcheck + --enable-id-check + --with-dbdir="${EPREFIX}"/var/lib/clamav + # Don't call --with-zlib=/usr (see bug #699296) + --with-zlib + --disable-llvm + --enable-openrc + --runstatedir=/run + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + rm -rf "${ED}"/var/lib/clamav || die + + if ! use libclamav-only ; then + if use systemd; then + # The tmpfiles entry is behind USE=systemd because the + # upstream OpenRC service files should (and do) ensure that + # the directories they need exist and have the correct + # permissions without the help of opentmpfiles. There are + # years-old root exploits in opentmpfiles, the design is + # fundamentally flawed, and the maintainer is not up to + # the task of fixing it. + dotmpfiles "${FILESDIR}/tmpfiles.d/clamav.conf" + systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service" + systemd_dounit "${FILESDIR}/clamd.service" + systemd_newunit "${FILESDIR}/freshclamd.service-r1" \ + "freshclamd.service" + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/clamd.logrotate" clamd + newins "${FILESDIR}/freshclam.logrotate" freshclam + use milter && \ + newins "${FILESDIR}/clamav-milter.logrotate-r1" clamav-milter + + # Modify /etc/{clamd,freshclam}.conf to be usable out of the box + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s/^#\(PidFile .*\)/\1/" \ + -e "s/^#\(LocalSocket .*\)/\1/" \ + -e "s/^#\(User .*\)/\1/" \ + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \ + -e "s:^\#\(LogTime\).*:\1 yes:" \ + -e "s/^#\(DatabaseDirectory .*\)/\1/" \ + "${ED}"/etc/clamd.conf.sample || die + + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s/^#\(PidFile .*\)/\1/" \ + -e "s/^#\(DatabaseOwner .*\)/\1/" \ + -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ + -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \ + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ + -e "s/^#\(DatabaseDirectory .*\)/\1/" \ + "${ED}"/etc/freshclam.conf.sample || die + + if use milter ; then + # Note: only keep the "unix" ClamdSocket and MilterSocket! + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s/^#\(PidFile .*\)/\1/" \ + -e "s/^#\(ClamdSocket unix:.*\)/\1/" \ + -e "s/^#\(User .*\)/\1/" \ + -e "s/^#\(MilterSocket unix:.*\)/\1/" \ + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ + "${ED}"/etc/clamav-milter.conf.sample || die + + cat >> "${ED}"/etc/conf.d/clamd <<-EOF + MILTER_NICELEVEL=19 + START_MILTER=no + EOF + + systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service + fi + + local i + for i in clamd freshclam clamav-milter + do + if [[ -f "${ED}"/etc/"${i}".conf.sample ]]; then + mv "${ED}"/etc/"${i}".conf{.sample,} || die + fi + done + + # These both need to be writable by the clamav user. + # TODO: use syslog by default; that's what it's for. + diropts -o clamav -g clamav + keepdir /var/lib/clamav + keepdir /var/log/clamav + fi + + if use doc ; then + local HTML_DOCS=( docs/html/. ) + einstalldocs + + if ! use libclamav-only ; then + doman docs/man/*.[1-8] + fi + fi + + find "${ED}" -name '*.la' -delete || die +} + +src_test() { + if use libclamav-only ; then + ewarn "Test target not available when USE=libclamav-only is set, skipping tests ..." + return 0 + fi + + emake quick-check +} + +pkg_postinst() { + if ! use libclamav-only ; then + if use systemd ; then + tmpfiles_process clamav.conf + fi + fi + + if use milter ; then + elog "For simple instructions how to setup the clamav-milter read the" + elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}" + fi + + local databases=( "${EROOT}"/var/lib/clamav/main.c[lv]d ) + if [[ ! -f "${databases}" ]] ; then + ewarn "You must run freshclam manually to populate the virus database" + ewarn "before starting clamav for the first time." + fi + + ewarn "This version of ClamAV provides separate OpenRC services" + ewarn "for clamd, freshclam, clamav-milter, and clamonacc. The" + ewarn "clamd service now starts only the clamd daemon itself. You" + ewarn "should add freshclam (and perhaps clamav-milter) to any" + ewarn "runlevels that previously contained clamd." +} diff --git a/app-antivirus/clamav/files/clamav-0.103.8-c-std.patch b/app-antivirus/clamav/files/clamav-0.103.8-c-std.patch new file mode 100644 index 000000000000..91556a1ae422 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-0.103.8-c-std.patch @@ -0,0 +1,204 @@ +From b9e2714d5b42ad9a0742746996b989400c794adb Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Fri, 4 Nov 2022 19:31:15 -0400 +Subject: [PATCH 1/2] clamonacc/c-thread-pool/thpool.c: define _GNU_SOURCE for + syscall(). + +On Linux, thpool.c uses syscall() from unistd.h, but that function is +not defined without _GNU_SOURCE: + + c-thread-pool/thpool.c: In function 'jobqueue_pull': + c-thread-pool/thpool.c:474:105: error: implicit declaration of function + 'syscall' [-Werror=implicit-function-declaration] + +In general that's not great, because it hinders some compiler diagnostics, +but it will also cause problems down the road if (for example) clang-16 +decides to enable -Werror=implicit-function-declaration by default. + +This commit changes the _POSIX_C_SOURCE definition at the top of +thpool.c to _GNU_SOURCE, as in the syscall(2) man page. +--- + clamonacc/c-thread-pool/thpool.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clamonacc/c-thread-pool/thpool.c b/clamonacc/c-thread-pool/thpool.c +index 46572da5f4..27c5103ff1 100644 +--- a/clamonacc/c-thread-pool/thpool.c ++++ b/clamonacc/c-thread-pool/thpool.c +@@ -8,7 +8,7 @@ + * + ********************************/ + +-#define _POSIX_C_SOURCE 200809L ++#define _GNU_SOURCE + #include + #include + #include + +From 7e3425ab701141064d179c45af2251f61af4ccc7 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Fri, 4 Nov 2022 20:08:30 -0400 +Subject: [PATCH 2/2] */*: fix invalid prototypes. + +Prototypes (or the declarations themselves, if there is no +corresponding prototype) for functions that take no arguments are +required by the C standard to specify (void) as their argument list; +for example, + + regex_pcre.h:79:1: error: function declaration isn't a prototype + [-Werror=strict-prototypes] + 79 | cl_error_t cli_pcre_init_internal(); + +Future versions of clang may become strict about this, and there's no +harm in conforming to the standard right now, so we fix all such +instances in this commit. +--- + clamonacc/clamonacc.c | 2 +- + clamonacc/client/socket.h | 2 +- + clamonacc/inotif/hash.c | 2 +- + clamonacc/inotif/inotif.c | 2 +- + clamonacc/scan/onas_queue.c | 6 +++--- + libclamav/matcher-pcre.h | 6 +++--- + libclamav/regex_pcre.h | 2 +- + m4/reorganization/compiler_checks.m4 | 2 +- + shared/misc.h | 2 +- + 9 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/clamonacc/clamonacc.c b/clamonacc/clamonacc.c +index ba986ef06c..c020897908 100644 +--- a/clamonacc/clamonacc.c ++++ b/clamonacc/clamonacc.c +@@ -61,7 +61,7 @@ + pthread_t ddd_pid = 0; + pthread_t scan_queue_pid = 0; + +-static void onas_handle_signals(); ++static void onas_handle_signals(void); + static int startup_checks(struct onas_context *ctx); + static struct onas_context *g_ctx = NULL; + +diff --git a/clamonacc/client/socket.h b/clamonacc/client/socket.h +index 915f9086ca..ea84fb4c41 100644 +--- a/clamonacc/client/socket.h ++++ b/clamonacc/client/socket.h +@@ -31,4 +31,4 @@ struct onas_sock_t { + }; + + cl_error_t onas_set_sock_only_once(struct onas_context *ctx); +-int onas_get_sockd(); ++int onas_get_sockd(void); +diff --git a/clamonacc/inotif/hash.c b/clamonacc/inotif/hash.c +index e4b3f1f983..2bbc4cdbb4 100644 +--- a/clamonacc/inotif/hash.c ++++ b/clamonacc/inotif/hash.c +@@ -58,7 +58,7 @@ + + #if defined(HAVE_SYS_FANOTIFY_H) + +-static struct onas_bucket *onas_bucket_init(); ++static struct onas_bucket *onas_bucket_init(void); + static void onas_free_bucket(struct onas_bucket *bckt); + static int onas_bucket_insert(struct onas_bucket *bckt, struct onas_element *elem); + static int onas_bucket_remove(struct onas_bucket *bckt, struct onas_element *elem); +diff --git a/clamonacc/inotif/inotif.c b/clamonacc/inotif/inotif.c +index 7799ae4889..b8680e9856 100644 +--- a/clamonacc/inotif/inotif.c ++++ b/clamonacc/inotif/inotif.c +@@ -66,7 +66,7 @@ + + static int onas_ddd_init_ht(uint32_t ht_size); + static int onas_ddd_init_wdlt(uint64_t nwatches); +-static int onas_ddd_grow_wdlt(); ++static int onas_ddd_grow_wdlt(void); + + static int onas_ddd_watch(const char *pathname, int fan_fd, uint64_t fan_mask, int in_fd, uint64_t in_mask); + static int onas_ddd_watch_hierarchy(const char *pathname, size_t len, int fd, uint64_t mask, uint32_t type); +diff --git a/clamonacc/scan/onas_queue.c b/clamonacc/scan/onas_queue.c +index d279df7415..6fa7df6e96 100644 +--- a/clamonacc/scan/onas_queue.c ++++ b/clamonacc/scan/onas_queue.c +@@ -82,7 +82,7 @@ static cl_error_t onas_new_event_queue_node(struct onas_event_queue_node **node) + return CL_SUCCESS; + } + +-static void *onas_init_event_queue() ++static void *onas_init_event_queue(void) + { + + if (CL_EMEM == onas_new_event_queue_node(&g_onas_event_queue_head)) { +@@ -122,7 +122,7 @@ static void onas_destroy_event_queue_node(struct onas_event_queue_node *node) + return; + } + +-static void onas_destroy_event_queue() ++static void onas_destroy_event_queue(void) + { + + if (NULL == g_onas_event_queue_head) { +@@ -200,7 +200,7 @@ void *onas_scan_queue_th(void *arg) + pthread_cleanup_pop(1); + } + +-static int onas_queue_is_b_empty() ++static int onas_queue_is_b_empty(void) + { + + if (g_onas_event_queue.head->next == g_onas_event_queue.tail) { +diff --git a/libclamav/matcher-pcre.h b/libclamav/matcher-pcre.h +index 5ffc88fb26..b0bd51852b 100644 +--- a/libclamav/matcher-pcre.h ++++ b/libclamav/matcher-pcre.h +@@ -68,11 +68,11 @@ struct cli_pcre_meta { + }; + + /* PCRE PERFORMANCE DECLARATIONS */ +-void cli_pcre_perf_print(); +-void cli_pcre_perf_events_destroy(); ++void cli_pcre_perf_print(void); ++void cli_pcre_perf_events_destroy(void); + + /* PCRE MATCHER DECLARATIONS */ +-int cli_pcre_init(); ++int cli_pcre_init(void); + cl_error_t cli_pcre_addpatt(struct cli_matcher *root, const char *virname, const char *trigger, const char *pattern, const char *cflags, const char *offset, const uint32_t *lsigid, unsigned int options); + cl_error_t cli_pcre_build(struct cli_matcher *root, long long unsigned match_limit, long long unsigned recmatch_limit, const struct cli_dconf *dconf); + cl_error_t cli_pcre_recaloff(struct cli_matcher *root, struct cli_pcre_off *data, struct cli_target_info *info, cli_ctx *ctx); +diff --git a/libclamav/regex_pcre.h b/libclamav/regex_pcre.h +index d1f4127984..52653431d4 100644 +--- a/libclamav/regex_pcre.h ++++ b/libclamav/regex_pcre.h +@@ -76,7 +76,7 @@ struct cli_pcre_results { + }; + #endif + +-cl_error_t cli_pcre_init_internal(); ++cl_error_t cli_pcre_init_internal(void); + cl_error_t cli_pcre_addoptions(struct cli_pcre_data *pd, const char **opt, int errout); + cl_error_t cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override); + int cli_pcre_match(struct cli_pcre_data *pd, const unsigned char *buffer, size_t buflen, size_t override_offset, int options, struct cli_pcre_results *results); +diff --git a/m4/reorganization/compiler_checks.m4 b/m4/reorganization/compiler_checks.m4 +index f7984f4cb2..80c81e1d30 100644 +--- a/m4/reorganization/compiler_checks.m4 ++++ b/m4/reorganization/compiler_checks.m4 +@@ -121,7 +121,7 @@ extern void abort(void); + ((bb_size) > 0 && (sb_size) > 0 && (size_t)(sb_size) <= (size_t)(bb_size) \ + && (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) > (bb) && (sb) < ((bb) + (bb_size))) + +-int crashtest() ++int crashtest(void) + { + unsigned int backsize, dcur; + int dval=0x12000, unp_offset; +diff --git a/shared/misc.h b/shared/misc.h +index 436c73117b..63fdea0f50 100644 +--- a/shared/misc.h ++++ b/shared/misc.h +@@ -72,7 +72,7 @@ int daemonize(void); + /*closes stdin, stdout, stderr. This is called by daemonize, but not + * daemonize_all_return. Users of daemonize_all_return should call this + * when initialization is complete.*/ +-int close_std_descriptors(); ++int close_std_descriptors(void); + + /*Returns the return value of fork. All processes return */ + int daemonize_all_return(void); -- cgit v1.2.3