Bug 253928 - [PATCH] devel/libgtop - fix build under 14-CURRENT
Summary: [PATCH] devel/libgtop - fix build under 14-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-01 04:29 UTC by Cy Schubert
Modified: 2021-03-10 04:12 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
Fix build under 14-CURRENT (2.72 KB, patch)
2021-03-01 04:29 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer freebsd_triage 2021-03-01 04:29:36 UTC
Created attachment 222895 [details]
Fix build under 14-CURRENT

devel/libgtop fails to build under 14-CURRENT due to missing definition of bool.

In file included from procmap.c:57:
In file included from /usr/include/ufs/ufs/inode.h:50:
/usr/include/sys/buf.h:569:1: error: unknown type name 'bool'
bool    inmem(struct vnode *, daddr_t);
^
procmap.c:104:25: warning: unused variable 'um' [-Wunused-variable]
        struct ufsmount um;
                        ^
procmap.c:408:16: warning: cast from 'gchar *' (aka 'char *') to 'glibtop_map_entry *' (aka 'struct _glibtop_map_entry *') increases required alignment from 1 to 8 [-Wcast-align]
        return (glibtop_map_entry*) g_array_free(maps, FALSE);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
gmake[4]: *** [Makefile:573: procmap.lo] Error 1
gmake[4]: *** Waiting for unfinished jobs....

The attached patch fixes the build.
Comment 1 Charlie Li freebsd_committer freebsd_triage 2021-03-01 06:45:58 UTC
Duplicate of bug 253870. Couple of different approaches.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-03-04 16:15:19 UTC
A commit references this bug:

Author: cy
Date: Thu Mar  4 16:14:45 UTC 2021
New revision: 567321
URL: https://svnweb.freebsd.org/changeset/ports/567321

Log:
  devel/libgtop: Fix build on 14-CURRENT post 2bfd8992c7c7

  sys/inode.h now implicitly includes sys/buf.h which which itself has
  dependencies requiring repositioning of inode.h.

  This patch also references the inode itself instead of relying on the VTOI
  macro thereby removing the need to define the _KERNEL macro when including
  sys/inode.h.

  PR:		253928, 253870
  Submitted by:	nyan _ myuji.xyz
  Reported by:	cy, madpilot
  Reviewed by:	cy
  MFH:		2021Q1
  Differential Revision:	https://reviews.freebsd.org/D29050

Changes:
  head/devel/libgtop/files/patch-sysdeps_freebsd_procmap.c
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2021-03-10 04:12:16 UTC
fixed.