]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (mkfds) use getpagesize()
authorKarel Zak <kzak@redhat.com>
Thu, 11 Aug 2022 08:55:17 +0000 (10:55 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 11 Aug 2022 08:55:17 +0000 (10:55 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/helpers/test_mkfds.c

index e0a7ea86778b4eecfb2667d52c65e308438a08b5..bc3f5693916e3d036b5b6bd2a5b78c3d4fa83ff7 100644 (file)
@@ -621,8 +621,8 @@ static void make_mmapped_packet_socket(const struct factory *factory, struct fde
         * - linux/Documentation/networking/packet_mmap.rst
         * - https://sites.google.com/site/packetmmap/home
         */
-       req.tp_block_size = PAGE_SIZE;
-       req.tp_frame_size = PAGE_SIZE;
+       req.tp_block_size = getpagesize();
+       req.tp_frame_size = getpagesize();
        req.tp_block_nr = 1;
        req.tp_frame_nr = 1;
        if (setsockopt(sd, SOL_PACKET, PACKET_TX_RING, (char *)&req, sizeof(req)) < 0) {