[Linux-cluster] Fw: Building error in Cluster 2.03.09

Fabio M. Di Nitto fdinitto at redhat.com
Mon Nov 3 04:55:45 UTC 2008


On Fri, 31 Oct 2008, Pavel Kuzin wrote:

> Hello!
>
> I`m trying to build cluster 2.03.09 against linux 2.6.27.4.
>
> When building have a error:
>
> upgrade.o: In function `upgrade_device_archive':
> /root/newcluster/cluster-2.03.09/ccs/ccs_tool/upgrade.c:226: undefined 
> reference to `mkostemp'
> collect2: ld returned 1 exit status
> make[2]: *** [ccs_tool] Error 1
> make[2]: Leaving directory `/root/newcluster/cluster-2.03.09/ccs/ccs_tool'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/newcluster/cluster-2.03.09/ccs'
> make: *** [ccs] Error 2
>
> node2:~/newcluster/cluster-2.03.09# uname -a
> Linux node2 2.6.27.4 #2 SMP Fri Oct 31 13:42:09 MSK 2008 i686 GNU/Linux
>
> Distro  - Debian Etch 
> Seems mkostemp is available since glibc 2.7.
> I have 2.6.
> Can "mkostemp" be changed to another similar function?

You can apply this patch or wait for the next relese:

commit 6e8c492f8e8233bc5e295ae12322c40936279178
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Mon Nov 3 05:52:39 2008 +0100

     ccs: fix build with older glibc

     mkostemp has been introduced only in glibc 2.7. Switch to mkstemp.

     Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

diff --git a/ccs/ccs_tool/upgrade.c b/ccs/ccs_tool/upgrade.c
index b7cecf0..6a0e150 100644
--- a/ccs/ccs_tool/upgrade.c
+++ b/ccs/ccs_tool/upgrade.c
@@ -223,7 +223,7 @@ static int upgrade_device_archive(char *location){
    memset(tmp_file, 0, 128);
    sprintf(tmp_file, "/tmp/ccs_tool_tmp_XXXXXX");

-  tmp_fd = mkostemp(tmp_file, O_RDWR | O_CREAT |O_TRUNC);
+  tmp_fd = mkstemp(tmp_file);
    if(tmp_fd < 0){
      fprintf(stderr, "Unable to create temporary archive: %s\n", strerror(errno));
      error = -errno;

--
I'm going to make him an offer he can't refuse.




More information about the Linux-cluster mailing list