All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Cran <bruce@cran.org.uk>
To: fio@vger.kernel.org
Subject: [patch] FreeBSD build broken due to missing -lrt
Date: Wed, 15 Dec 2010 01:19:40 +0000	[thread overview]
Message-ID: <20101215011940.00001c21@unknown> (raw)

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

Hi,

The latest fio fails to link on FreeBSD because timer_create is in
librt but the -lrt flag is missing from Makefile.FreeBSD.

I also noticed a couple of compiler warnings when building with clang -
a format of "%Lu" is used but 'L' doesn't have any effect with 'u' - I
guess %llu is needed since the types are 'unsigned long long'?

I've attached patches against git HEAD.

-- 
Bruce Cran

[-- Attachment #2: Makefile.FreeBSD.diff --]
[-- Type: application/octet-stream, Size: 475 bytes --]

diff --git a/Makefile.FreeBSD b/Makefile.FreeBSD
index e4adfca..9378b19 100644
--- a/Makefile.FreeBSD
+++ b/Makefile.FreeBSD
@@ -52,7 +52,7 @@ mandir = $(prefix)/man
 %.o: %.c
 	$(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
 fio: $(OBJS)
-	$(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm
+	$(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -lrt
 
 depend:
 	$(QUIET_DEP)$(CC) -MM $(ALL_CFLAGS) $(SOURCE) 1> .depend

[-- Attachment #3: filesetup.c.diff --]
[-- Type: application/octet-stream, Size: 769 bytes --]

diff --git a/filesetup.c b/filesetup.c
index ae893c7..bb36234 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -316,7 +316,7 @@ static int get_file_size(struct thread_data *td, struct fio_file *f)
 		return ret;
 
 	if (f->file_offset > f->real_file_size) {
-		log_err("%s: offset extends end (%Lu > %Lu)\n", td->o.name,
+		log_err("%s: offset extends end (%llu > %llu)\n", td->o.name,
 					f->file_offset, f->real_file_size);
 		return 1;
 	}
@@ -734,7 +734,7 @@ int setup_files(struct thread_data *td)
 		temp_stall_ts = 1;
 		if (!terse_output)
 			log_info("%s: Laying out IO file(s) (%u file(s) /"
-				 " %LuMB)\n", td->o.name, need_extend,
+				 " %lluMB)\n", td->o.name, need_extend,
 					extend_size >> 20);
 
 		for_each_file(td, f, i) {

             reply	other threads:[~2010-12-15  1:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15  1:19 Bruce Cran [this message]
2010-12-15  9:33 ` [patch] FreeBSD build broken due to missing -lrt Jens Axboe

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=20101215011940.00001c21@unknown \
    --to=bruce@cran.org.uk \
    --cc=fio@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.