added mkdev, small compilation fixes