Make volume component work on FreeBSD
- Edit compile instructions - Reuse OpenBSD sndio implementation
This commit is contained in:
		
				
					committed by
					
						
						drkhsh
					
				
			
			
				
	
			
			
			
						parent
						
							77bfb76a97
						
					
				
				
					commit
					798809ce02
				
			@@ -7,7 +7,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "../util.h"
 | 
					#include "../util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__OpenBSD__)
 | 
					#if defined(__OpenBSD__) | defined(__FreeBSD__)
 | 
				
			||||||
	#include <sys/queue.h>
 | 
						#include <sys/queue.h>
 | 
				
			||||||
	#include <poll.h>
 | 
						#include <poll.h>
 | 
				
			||||||
	#include <sndio.h>
 | 
						#include <sndio.h>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,7 +59,7 @@ static const char unknown_str[] = "n/a";
 | 
				
			|||||||
 * uptime              system uptime                   NULL
 | 
					 * uptime              system uptime                   NULL
 | 
				
			||||||
 * username            username of current user        NULL
 | 
					 * username            username of current user        NULL
 | 
				
			||||||
 * vol_perc            OSS/ALSA volume in percent      mixer file (/dev/mixer)
 | 
					 * vol_perc            OSS/ALSA volume in percent      mixer file (/dev/mixer)
 | 
				
			||||||
 *                                                     NULL on OpenBSD
 | 
					 *                                                     NULL on OpenBSD/FreeBSD
 | 
				
			||||||
 * wifi_perc           WiFi signal in percent          interface name (wlan0)
 | 
					 * wifi_perc           WiFi signal in percent          interface name (wlan0)
 | 
				
			||||||
 * wifi_essid          WiFi ESSID                      interface name (wlan0)
 | 
					 * wifi_essid          WiFi ESSID                      interface name (wlan0)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
 | 
				
			|||||||
CFLAGS   = -std=c99 -pedantic -Wall -Wextra -Os
 | 
					CFLAGS   = -std=c99 -pedantic -Wall -Wextra -Os
 | 
				
			||||||
LDFLAGS  = -L$(X11LIB) -s
 | 
					LDFLAGS  = -L$(X11LIB) -s
 | 
				
			||||||
# OpenBSD: add -lsndio
 | 
					# OpenBSD: add -lsndio
 | 
				
			||||||
# FreeBSD: add -lkvm
 | 
					# FreeBSD: add -lkvm -lsndio
 | 
				
			||||||
LDLIBS   = -lX11
 | 
					LDLIBS   = -lX11
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# compiler and linker
 | 
					# compiler and linker
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user