Skip to contentSkip to conversation

Enabling vtpm causes installation error

PATCH In review S.Çağlar Onur 2 participants 3 messages May 18, 2007 – May 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enabling vtpm causes installation error

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

tools/vtpm/vtpm.patch +1 -1
diff -r aee991c7723a tools/vtpm/vtpm.patch
@@ -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

Signature · 4 lines
S.Çağlar Onur <[email protected]>
http://cekirdek.pardus.org.tr/~caglar/

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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

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

Quoted 2 lines · S.Çağlar Onur

-+ 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-----

#2 lore raw

19 May 2007 Cts tarihinde, Ulrich Drepper şunları yazmıştı:

Quoted 7 lines
Quoted 2 lines · S.Çağlar Onur

-+ 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;

tools/vtpm/vtpm.patch +0 -1
diff -r aee991c7723a tools/vtpm/vtpm.patch
@@ -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

Signature · 4 lines
S.Çağlar Onur <[email protected]>
http://cekirdek.pardus.org.tr/~caglar/

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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel