Re: util-linux-2.22: backward compatibility of wdctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 09/05/2012 01:27 PM, Moritz Barsnick wrote:
> Hi everyone,
> congratulations on util-linux 2.22. BTW, I recently took the liberty of
> refreshing the freshmeat aka freecode entry, and submitted an update
> for 2.22 today. I hope that's okay.
> 
> Anyway, just for the fun of it, I was trying to compile util-linux on
> an SLES10 (SUSE Linux Enterprise) machine. That's one of those
> enterprise distributions with somewhat ancient environments. ;-) But
> nothing out of the ordinary nowadays, I think.
> 
> I didn't succeed, because wdctl makes use of #defines which are not
> defined on this OS:
> 
>   make[2]: Entering directory `/tmp/Bui/util-linux/util-linux-2.22'
>     CC     sys-utils/wdctl.o
>   sys-utils/wdctl.c:53:4: error: 'WDIOF_PRETIMEOUT' undeclared here (not in a function)
>   sys-utils/wdctl.c: In function 'read_watchdog':
>   sys-utils/wdctl.c:352:17: error: 'WDIOC_GETPRETIMEOUT' undeclared (first use in this function)
>   sys-utils/wdctl.c:352:17: note: each undeclared identifier is reported only once for each function it appears in
>   sys-utils/wdctl.c:352:3: warning: passing argument 2 of 'ioctl' makes integer from pointer without a cast [enabled by default]
>   In file included from sys-utils/wdctl.c:21:0:
>   /usr/include/sys/ioctl.h:42:12: note: expected 'long unsigned int' but argument is of type 'const struct wdflag *'
>   sys-utils/wdctl.c:354:17: error: 'WDIOC_GETTIMELEFT' undeclared (first use in this function)
>   sys-utils/wdctl.c:354:3: warning: passing argument 2 of 'ioctl' makes integer from pointer without a cast [enabled by default]
>   In file included from sys-utils/wdctl.c:21:0:
>   /usr/include/sys/ioctl.h:42:12: note: expected 'long unsigned int' but argument is of type 'const struct wdflag *'
>   make[2]: *** [sys-utils/wdctl.o] Error 1
> 
> This system's/kernel's watchdog.h doesn't have those #defines:
> 
> [...]
>
> To add to the misery, it isn't possible to disable the build of wdctl
> AFAICT.

You can use a crude hack to work around building wdctl:

  $ touch sys-utils/wdctl.o wdctl ; make

but this won't make you happy. You'll most propably hit other
problems. This is from my SLES 10.4 system:

  In file included from disk-utils/partx.h:5,
                   from disk-utils/partx.c:32:
  /usr/include/linux/blkpg.h:36: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
  In file included from disk-utils/partx.c:32:
  disk-utils/partx.h: In function ‘partx_del_partition’:
  disk-utils/partx.h:32: error: ‘struct blkpg_ioctl_arg’ has no member named ‘data’
  disk-utils/partx.h: In function ‘partx_add_partition’:
  disk-utils/partx.h:51: error: ‘struct blkpg_ioctl_arg’ has no member named ‘data’
  disk-utils/partx.h: In function ‘partx_resize_partition’:
  disk-utils/partx.h:70: error: ‘struct blkpg_ioctl_arg’ has no member named ‘data’
  make[2]: *** [disk-utils/partx-partx.o] Error 1

Temporarily defining __user to nothing seems to work:

  $ make CFLAGS='-D__user='

... although this is another bad workaround. ;-(

Have a nice day,
Berny
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux