fix two alignment issues found by the debian buildd gcc on sparc

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2022 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-11-04 16:51:26 +00:00
parent faf1fd76a9
commit 961ce33b5e
2 changed files with 27 additions and 20 deletions

View file

@ -506,6 +506,7 @@ int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
char *t;
const char *espeaker;
uint32_t key;
pa_assert(m);
@ -584,7 +585,9 @@ int pa__init(pa_module*m) {
pa_log("Failed to load cookie");
goto fail;
}
*(int32_t*) ((uint8_t*) u->write_data + ESD_KEY_LEN) = ESD_ENDIAN_KEY;
key = ESD_ENDIAN_KEY;
memcpy((uint8_t*) u->write_data + ESD_KEY_LEN, &key, sizeof(key));
/* Reserve space for the response */
u->read_data = pa_xmalloc(u->read_length = sizeof(int32_t));