All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enabling vtpm causes installation error
@ 2007-05-18 23:38 S.Çağlar Onur
  2007-05-18 23:54 ` Ulrich Drepper
  0 siblings, 1 reply; 3+ messages in thread
From: S.Çağlar Onur @ 2007-05-18 23:38 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1585 bytes --]

Hi;

Enabling vtpm support on xen-3.1.0 causes installation error like following;

make -C vtpm install
make[2]:`/var/pisi/xen-3.1.0-9/work/xen-3.1.0-src/tools/vtpm/vtpm' dizinine 
giriliyor
gcc -Werror -g3 -I. -Wp,-MD,.install.d -g -Wall  -DDEBUG -I. -Itpm -I../../vtpm_manager/manager -c 
tpmd.c -o tpmd.o
cc1: warnings being treated as errors
tpmd.c: In function 'main':
tpmd.c:164: warning: passing argument 2 of 'accept' from incompatible pointer 
type
make[2]: *** [tpmd.o] Hata 1
make[2]: `/var/pisi/xen-3.1.0-9/work/xen-3.1.0-src/tools/vtpm/vtpm' dizininden 
çıkılıyor
make[1]: *** [install] Hata 2
make[1]: `/var/pisi/xen-3.1.0-9/work/xen-3.1.0-src/tools/vtpm' dizininden 
çıkılıyor
make: *** [install] Hata 2
DEBUG: "make DESTDIR=/var/pisi/xen-3.1.0-9/install XEN_PYTHON_NATIVE_INSTALL=1 
install" için dönüş değeri 2

Following patch fixes that warning so -Werror no longer fails

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>

diff -r aee991c7723a tools/vtpm/vtpm.patch
--- a/tools/vtpm/vtpm.patch	Wed May 09 16:34:47 2007 +0100
+++ b/tools/vtpm/vtpm.patch	Sat May 19 02:36:41 2007 +0300
@@ -468,7 +468,7 @@ diff -uprN tpm_emulator/tpmd.c vtpm/tpmd
 +#ifndef VTPM_MULTI_VM
 +  int sockfd = -1;
 +  struct sockaddr_un addr;
-+  struct sockaddr_un client_addr;
++  struct sockaddr client_addr;
 +  unsigned int client_length;
 +
 +#endif

Cheers
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Enabling vtpm causes installation error
  2007-05-18 23:38 [PATCH] Enabling vtpm causes installation error S.Çağlar Onur
@ 2007-05-18 23:54 ` Ulrich Drepper
  2007-05-19  0:01   ` S.Çağlar Onur
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Drepper @ 2007-05-18 23:54 UTC (permalink / raw)
  To: caglar; +Cc: xen-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

S.Çağlar Onur wrote:
> -+  struct sockaddr_un client_addr;
> ++  struct sockaddr client_addr;

This is very wrong.  struct sockaddr is basically an abstract type.  You
never allocate objects of this type.  Add casts in places where
client_addr is used.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGTjyh2ijCOnn/RHQRAojkAKCUkgG9tBJnsXzJ8PFSY8YZJFrDDQCfaT5c
4Q/eGu0RPiRadUsn4QXTlgs=
=eYhM
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Enabling vtpm causes installation error
  2007-05-18 23:54 ` Ulrich Drepper
@ 2007-05-19  0:01   ` S.Çağlar Onur
  0 siblings, 0 replies; 3+ messages in thread
From: S.Çağlar Onur @ 2007-05-19  0:01 UTC (permalink / raw)
  To: xen-devel; +Cc: Ulrich Drepper


[-- Attachment #1.1: Type: text/plain, Size: 1174 bytes --]

19 May 2007 Cts tarihinde, Ulrich Drepper şunları yazmıştı: 
> S.Çağlar Onur wrote:
> > -+  struct sockaddr_un client_addr;
> > ++  struct sockaddr client_addr;
>
> This is very wrong.  struct sockaddr is basically an abstract type.  You
> never allocate objects of this type.  Add casts in places where
> client_addr is used.

Irgh, thanks! Here is the updated one;

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>

diff -r aee991c7723a tools/vtpm/vtpm.patch
--- a/tools/vtpm/vtpm.patch	Wed May 09 16:34:47 2007 +0100
+++ b/tools/vtpm/vtpm.patch	Sat May 19 03:00:28 2007 +0300
@@ -579,7 +579,7 @@ diff -uprN tpm_emulator/tpmd.c vtpm/tpmd
 +        memset(&client_addr, 0, sizeof(client_addr));
 +        client_length = sizeof(client_addr);
 +
-+        vtpm_rx_fh = vtpm_tx_fh = accept(sockfd, &client_addr, 
&client_length);
++        vtpm_rx_fh = vtpm_tx_fh = accept(sockfd, (struct sockaddr 
*)&client_addr, &client_length);
 +      }
 +#endif
      }

Cheers
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-19  0:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-18 23:38 [PATCH] Enabling vtpm causes installation error S.Çağlar Onur
2007-05-18 23:54 ` Ulrich Drepper
2007-05-19  0:01   ` S.Çağlar Onur

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.