Skip to content

Instantly share code, notes, and snippets.

mdierolf / spotify.preload.c
Last active Sep 5, 2018
An LD_PRELOAD fix for a really stupid spotify problem
View spotify.preload.c
// Save this file somewhere as spotify.preload.c
// Then build the library:
// gcc -fPIC -shared -o ~/ spotify.preload.c -ldl
// When you execute spotify, you need to preload this library, which wraps the "setsockopt" function call with another function that gives spotify the results it expects:
// LD_PRELOAD=~/ spotify
// To make the desktop icon work, edit: /usr/share/applications/spotify.desktop
// Change Exec=... to: