HEADS UP: <utmp.h> gone. All welcome <utmpx.h>.

Rainer Hurling rhurlin at gwdg.de
Sat Jan 16 14:42:10 UTC 2010


On 16.01.2010 12:59 (UTC+1), Ed Schouten wrote:
> Hello Rainer,
>
> * Rainer Hurling<rhurlin at gwdg.de>  wrote:
>> After updating my system i tried to rebuild Xorg ports. All went
>> fine until it has to compile x11/sessreg.
>>
>> It seems that the configure script does not find struct
>> 'utmpx.ut_syslen' and so the build process falls back to utmp?
>>
>> Could you please take a look if this is an issue of the new interface.
>
> I just looked at this problem and sent a patch to the Xorg folks. I
> can't find my email in the xorg-devel archives yet, so I've attached a
> patch to this email. Hopefully the respective port maintainer can turn
> it into something useful.

Ed, many thanks for this patch.

There was a small problem with patching sessreg.c:


patch < sessreg.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/configure.ac b/configure.ac
|index 6e2f470..be1b4b4 100644
|--- a/configure.ac
|+++ b/configure.ac
--------------------------
Patching file configure.ac using Plan A...
Hunk #1 succeeded at 36 with fuzz 2 (offset -3 lines).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/sessreg.c b/sessreg.c
|index c674450..992a213 100644
|--- a/sessreg.c
|+++ b/sessreg.c
--------------------------
Patching file sessreg.c using Plan A...
Hunk #1 succeeded at 80 (offset 5 lines).
Hunk #2 succeeded at 88 (offset 5 lines).
Hunk #3 succeeded at 101 with fuzz 2 (offset 5 lines).
Hunk #4 failed at 115.
Hunk #5 succeeded at 189 (offset 5 lines).
Hunk #6 succeeded at 197 (offset 5 lines).
Hunk #7 succeeded at 234 (offset 5 lines).
Hunk #8 succeeded at 262 (offset 5 lines).
Hunk #9 succeeded at 280 (offset 5 lines).
Hunk #10 succeeded at 299 (offset 5 lines).
Hunk #11 succeeded at 342 (offset 5 lines).
Hunk #12 succeeded at 394 (offset 5 lines).
Hunk #13 succeeded at 441 (offset 5 lines).
Hunk #14 succeeded at 449 (offset 5 lines).
Hunk #15 succeeded at 462 (offset 5 lines).
Hunk #16 succeeded at 481 (offset 5 lines).
Hunk #17 succeeded at 549 (offset 5 lines).
1 out of 17 hunks failed--saving rejects to sessreg.c.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/sessreg.h b/sessreg.h
|index 6583d57..6b3edc2 100644
|--- a/sessreg.h
|+++ b/sessreg.h
--------------------------
Patching file sessreg.h using Plan A...
Hunk #1 succeeded at 57 (offset 6 lines).
done


cat sessreg.c.rej
***************
*** 108,114 ****
    */
   static int hflag, sflag, xflag, tflag;
   static char *host_name = NULL;
   static int slot_number;
   static char *xservers_file, *ttys_file;
   static char *user_name;
   static int aflag, dflag;
--- 115,123 ----
    */
   static int hflag, sflag, xflag, tflag;
   static char *host_name = NULL;
+ #ifdef USE_UTMP
   static int slot_number;
+ #endif
   static char *xservers_file, *ttys_file;
   static char *user_name;
   static int aflag, dflag;


Doing this patch manually works. After patching the port compiles again :-)

Rainer


More information about the freebsd-x11 mailing list