Skip to content

Fails to build on 32-bit FreeBSD #538

@pkubaj

Description

@pkubaj

General description of bug:

  • What happened: build fails on 32-bit FreeBSD (armv6, armv7, i386, powerpc)
  • What should happen: build should succeed
  • Did it work in an older version: no
  • Where did you get the binary: self-built
  • Does this issue still occurs in the latest dev build? Yes

Error:

/wrkdirs/usr/ports/sysutils/fastfetch/work-full/fastfetch-2.0.3/src/detection/memory/memory_bsd.c:7:68: error: incompatible pointer types passing 'uint64_t *' (aka 'unsigned long long *') to parameter of type 'size_t *' (aka 'unsigned int *') [-Werror,-Wincompatible-pointer-types]
    if (sysctl((int[]){ CTL_HW, HW_PHYSMEM }, 2, &ram->bytesTotal, &length, NULL, 0))
                                                                   ^~~~~~~
/usr/include/sys/sysctl.h:1189:48: note: passing argument to parameter here
int     sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
                                                   ^
/wrkdirs/usr/ports/sysutils/fastfetch/work-full/fastfetch-2.0.3/src/detection/memory/memory_bsd.c:12:62: error: incompatible pointer types passing 'uint64_t *' (aka 'unsigned long long *') to parameter of type 'size_t *' (aka 'unsigned int *') [-Werror,-Wincompatible-pointer-types]
    if (sysctl((int[]){ CTL_HW, HW_PAGESIZE }, 2, &pageSize, &length, NULL, 0))
                                                             ^~~~~~~
/usr/include/sys/sysctl.h:1189:48: note: passing argument to parameter here
int     sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
                                                   ^
2 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions