Linux Container Development
 help / color / mirror / Atom feed
From: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
To: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: [PATCH 2/4] restart: (build fix hack) define sa_family_t and struct linger
Date: Wed, 16 Sep 2009 04:27:49 -0500	[thread overview]
Message-ID: <1253093271-16357-3-git-send-email-ntl@pobox.com> (raw)
In-Reply-To: <1253093271-16357-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>

restart.c doesn't build against exported kernel headers:

$ make CPPFLAGS=-I$PWD/../linux-2.6.git/usr/include
cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I../linux/include -I../linux/arch//include -DCHECKPOINT_DEBUG -D__REENTRANT -pthread -I/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include restart.c clone_ppc32.o -o restart
In file included from /home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include/linux/checkpoint_hdr.h:16,
                 from restart.c:42:
/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include/linux/un.h:7: error: expected specifier-qualifier-list before ‘sa_family_t’
In file included from restart.c:42:
/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include/linux/checkpoint_hdr.h:407: error: field ‘linger’ has incomplete type
make: *** [restart] Error 1

I am not sure what the right fix is.  This is not it.
---
 restart.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/restart.c b/restart.c
index 2d8d796..b93a2e1 100644
--- a/restart.c
+++ b/restart.c
@@ -10,6 +10,13 @@
 
 #define _GNU_SOURCE
 
+/* Hacks ahoy */
+typedef unsigned short	sa_family_t;
+struct linger {
+	int		l_onoff;	/* Linger active		*/
+	int		l_linger;	/* How long to linger for	*/
+};
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-- 
1.6.0.6

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

  parent reply	other threads:[~2009-09-16  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16  9:27 [PATCH 0/4] user-cr: powerpc support etc Nathan Lynch
     [not found] ` <1253093271-16357-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2009-09-16  9:27   ` [PATCH 1/4] fix rename fallout Nathan Lynch
2009-09-16  9:27   ` Nathan Lynch [this message]
2009-09-16  9:27   ` [PATCH 3/4] mktree: initial powerpc support hacks Nathan Lynch
2009-09-16  9:27   ` [PATCH 4/4] makefile hack for powerpc Nathan Lynch
2009-09-16 18:05   ` [PATCH 0/4] user-cr: powerpc support etc Oren Laadan

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=1253093271-16357-3-git-send-email-ntl@pobox.com \
    --to=ntl-e+axbwqsrlaavxtiumwx3w@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox