cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: [Linux-cluster] Fw: Building error in Cluster 2.03.09
Date: Mon, 3 Nov 2008 05:55:45 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0811030554590.2932@trider-g7> (raw)
In-Reply-To: <0d9d01c93b49$a5a81fc0$a401a8c0@mainoffice.nodex.ru>

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@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@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.



      parent reply	other threads:[~2008-11-03  4:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0d9d01c93b49$a5a81fc0$a401a8c0@mainoffice.nodex.ru>
2008-10-31 18:31 ` [Cluster-devel] Re: [Linux-cluster] Fw: Building error in Cluster 2.03.09 Lon Hohberger
2008-11-02  8:49 ` Fabio M. Di Nitto
2008-11-03  4:55 ` Fabio M. Di Nitto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0811030554590.2932@trider-g7 \
    --to=fdinitto@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).